-
Notifications
You must be signed in to change notification settings - Fork 823
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
OAuth configuration block missing from amplifyconfiguration.json when Cognito User Pool is not enabled #11127
Comments
Hey @brandonmaul, thank you for reaching out. Wanted to get some additional information.
Is the Cognito resource added as via the Amplify CLI using Using a React app and Amplify CLI, I was unable to reproduce this, it would be great if you provide me additional information. please feel free in adding screenshots to the reproduction steps as this would enable us to create a similar environment. |
@ykethan hi! Thanks for the reply. We imported the cognito resource using 'amplify import auth' However, after removing the auth and re-importing, the behaviour still persisted |
Hey @brandonmaul, On diving deeper and trying to reproduce the issue, here are my observations as follows.
"oauth": {
"domain": "xyzabc.us-east-1.amazoncognito.com",
"scope": [
"aws.cognito.signin.user.admin",
"com.test/email",
"com.test/profile"
],
"redirectSignIn": "https://localhost:3000/",
"redirectSignOut": "https://localhost:3000/",
"responseType": "code"
},
"oauth": {
"domain": "xyzabc.auth.us-east-1.amazoncognito.com"
},
Does this align with what you are experiencing? If not, could you provide us additional information into the reproduction steps containing Cognito configuration on the AWS console and Screenshot(or the contents) of the amplifyconfiguration.json. |
Hey @brandonmaul , following up on this behaviour. Please do let us know if you require any assistance. |
closing the issue due to inactivity. please do reach out to us again, we would be happy in assisting you. |
I am facing the same issue can anyone help me? |
@Nayanigaonkar this is feature request on imported auth resource when using custom auth providers and is currently being tracked here: #10932 if this is not your use case, could you open a new issue using the bug template. |
... where is the NEW documentation on passing Federated/OAuth provider info to the Authenticator component in the Amplify v6+? |
|
Yes, that works. Thanks! |
Where's the documentation for converting a config file from v5 to v6 ? of course this works but it's so ugly and ridiculous. |
… no docs found. The above snippet was produced by trial and error. |
Before opening, please confirm:
How did you install the Amplify CLI?
curl
If applicable, what version of Node.js are you using?
18.9.0
Amplify CLI Version
10.2.2
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
In the Cognito User Pool that was imported into Amplify, I unchecked the "Cognito User Pool" option under Enabled Identity Providers, and kept the federated SAML "azuread" provider enabled. This was done for both the native app client and the web app client.
Amplify Categories
auth, api
Amplify Commands
pull
Describe the bug
I am working on an iOS native app with this Amplify instance. When doing an
amplify pull
after saving the changes mentioned above, theamplifyconfiguration.json
file is missing the required OAuth block (under theauth/plugins/awsCognitoAuthPlug/Auth/Default
object in the JSON) for signIn/signOut to work. I have to manually add it in for the SDK to function properly.The block in question:
If I re-enable the Cognito User Pool in the "Enabled Identity Providers", and then do an
amplify pull
the OAuth block is generated as expected.Expected behavior
The OAuth block above should be added to the
amplifyconfiguration.json
file when any Identity Provider is enabled, and the Cognito User Pool shouldn't be required to product this OAuth block in the configuration.Reproduction steps
amplify pull
to load the configuration.amplifyconfiguration.json
file - it won't have the OAuth block required to do anAmplify.Auth.signInWithWebUI(...)
andAmplify.Auth.signOut(...)
GraphQL schema(s)
N/A
Project Identifier
N/A
Log output
N/A
Additional information
No response
The text was updated successfully, but these errors were encountered: