Closed cmaycumber closed 3 years ago
Hi @cmaycumber 👋 Can you share how your OAuth is configured in the code? Or what documentation you might have followed to set it up.
https://docs.amplify.aws/lib/auth/social/q/platform/js/#full-samples
Also, can you check what your App client settings look like in the Cognito User Pools console? This is the way my app is configured for OAuth with Google.
After digging a bit I did find that what you provided did work for me, however I also expected them to show under the Federation -> Identity Providers section like so:
I ended up using some CDK infrastructure to add the required secrets and client keys. I'm not sure if that could be abstracted in the future.
@cmaycumber Awesome! Glad I was able to help 😄 I think the reason those setting are under App integration
is because they are particular to the separate clients. In regards to the abstraction of secrets and client keys, if you mean one like the Google Web Client ID or Sign In With Apple service IDs, etc , I believe that could be configured through the Amplify CLI after running amplify add auth
/amplify update auth
and going through the OAuth/Social Provider settings.
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels or Discussions for those types of questions.
Before opening, please confirm:
JavaScript Framework
React, React Native
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
Describe the bug
When using Auth.federeatedSignIn with the
responseType: "code"
param in the oauth config I get the following error:OAuth - Error handling auth response. TypeError: t.trim is not a function.
when switching toresponseType: 'token'
, the error disappears and logs the user in successfully.Expected behavior
No error, the user is logged in successfully on a redirect from federated sign-in.
Reproduction steps
Change from responseType: "code" to responseType: "token" in oauth config, run
Auth.federatedSignIn({ provider: 'Google' })
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response