-
Notifications
You must be signed in to change notification settings - Fork 891
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
Set custom Role(Scope) in AWSCognitoIdentityProvider #1154
Comments
Hi @kuchhadiyaa , In your case you may want to check What is the method call you are using to sign-in users? |
Hi @minbi , Yes, We already have enabled those settings when we created the pool. We are using the following method to sign in
and save a closure from the following method to call it when a user does sign in. (AWSCognitoIdentityPasswordAuthentication)
When a user does sign in we set the result to closure
|
We will followup with the service team to see which method calls are appropriate. |
@muellerfr any updates on this? |
1 similar comment
@muellerfr any updates on this? |
Hi @kuchhadiyaa , Currently, specifying custom scopes is only supported via the Oauth client (Cognito Auth SDK) as you have mentioned above. It is not possible to to request custom scopes using the API flow. I will take this as a feature request to the service team. |
@minbi @nikhil-dabhade Any plan in near future to complete this? Or do you have any workaround to do this? Any suggestions are welcome. |
@minbi @nikhil-dabhade Any plan in near future to complete this? Or do you have any workaround to do this? |
@minbi @nikhil-dabhade Our API is trying to do just-in-time provisioning through Cognito. Our mobile app logs into Cognito, then sends the access token with each API request. When a user hits our API for the first time, it creates a new user in the database if they haven't already been created. This bug is preventing us from using the access_token from the client to call the userinfo endpoint (which is the OIDC standard way of JIT provisioning), so we have no way of populating the user's information. Additionally, the ID token only contains email and phone and this bug is preventing us from requesting additional info like first and last name, so we can't use that method either. What is the AWS-recommended way of doing JIT user provisioning into our app when using Cognito as our IDP? |
@minbi @nikhil-dabhade Is there any plan to update the client to meet OIDC standards? At this point, the access_token generated from this client does not work against the userinfo endpoint, as we cannot use all of the standard OIDC scopes. |
Thanks for opening this feature request. We recommend using Amplify Auth for this -- for more information, please visit https://docs.amplify.aws/swift/build-a-backend/auth/ |
State your question
We are using AWSCognitoIdentityProvider to provide login and signup in our app. We would like to change the spope from
"scope": "aws.cognito.signin.user.admin",
to"scope": "openid profile"
Currently, there seems no way or changing scopes after or before login.
Which AWS Services are you utilizing?
We are using
AWSCognitoIdentityProvider
Provide code snippets (if applicable)
We have tried to update scope after user log in using the following method on
AWSCognitoIdentityProvider
but it returns an error. though we want to get required scope when a user logs in not after it.Environment(please complete the following information):
Device Information (please complete the following information):
If you need help with understanding how to implement something in particular then we suggest that you first look into our developer guide. You can also simplify your process of creating an application, as well as the associated backend setup by using the Amplify CLI.
The text was updated successfully, but these errors were encountered: