Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cognito: "Validation Error for Claims" - when using custom attributes in cognito #72

Open
JustinGuese opened this issue Jun 5, 2022 · 1 comment

Comments

@JustinGuese
Copy link

Hey,
I just can't get cognito to work with this library...
I am using the second example

def secure_access(current_user: AccessUser = Depends(auth.claim(AccessUser))):
    # access token is valid and getting user info from access token
    return f"Hello", {current_user.sub}

with the example

class AccessUser(BaseModel):
    sub: str

But as soon as I add custom attributes that are set in my cognito pool, like "email" or "family_name", it throws the error
"Validation Error for Claims"

How can I add custom attributes to grab them like current_user.family_name ?

@onejgordon
Copy link

Also interested in whether additional custom Cognito attributes are supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants