-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Not so much an issue as a question, i wanted to work with a local cognito provider while running my service locally before connecting to cognito in production. I noticed I wasn't able to specify a local host url, looking closer into the code looks like its all hardcoded in the Cognito object. Is there anyway for me to specify the url or would i have to create a PR?
class Cognito(ScopedAuth):
"""
Verify access token of AWS Cognito
"""
user_info = None
def __init__(
self,
region: str,
userPoolId: str,
client_id: str,
scope_key: Optional[str] = "cognito:groups",
auto_error: bool = True,
):
url = f"https://cognito-idp.{region}.amazonaws.com/{userPoolId}/.well-known/jwks.json"
jwks = JWKS(url=url)
super().__init__(
jwks,
audience=client_id,
issuer=f"https://cognito-idp.{region}.amazonaws.com/{userPoolId}",
scope_key=scope_key,
auto_error=auto_error,
extra=CognitoExtraVerifier(
client_id=client_id,
issuer=f"https://cognito-idp.{region}.amazonaws.com/{userPoolId}",
token_use={"access"},
),
)
AndreGuerra123
Metadata
Metadata
Assignees
Labels
No labels