Closed kxu12348760 closed 10 months ago
Hi @kxu12348760 thank you for opening this issue, im currently investigating this and wanted to check some thing with you first. It seems that the step of checking 2fa verification request maybe the root of the issue here - to help in isolating, have you been able to test a login without the 2fa check and get a successful login?
hi @nadetastic thanks for your reply. We ended up resolving this issue. It turns out that we were able to successfully obtain a token while connecting to clients as long as our client didn't have a client secret set, whereas originally, the client we couldn't connect to had a client secret set.
@kxu12348760 okay great! Glad you were able to get this resolved. Let me know if you have any other questions, otherwise I will go ahead and close out this issue.
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
Other
Environment information
Describe the bug
We are attempting to add cognito auth integration through aws-amplify in our web application. This is for our dev/staging/non-production environment.
After finishing setting up our backend resources and configuring our frontend to connect to those existing resources, our frontend code calls signInWithRedirect while passing in our custom (okta-based) provider.
However, after successfully signing in through our okta custom oidc provider, after redirecting back to our app, we cannot continue because it seems that we get an invalid_client response from the oauth2/token endpoint, which seems very similar to this previous issue.
Expected behavior
Expected:
Actual:
Reproduction steps
signInWithRedirect({provider: {custom: <my_custom_oidc_provider_name>}})
). Note that in the first screenshot below, I've included console logs which partially show the parameters passed to Amplify.configure in our app), which I've double-checked and should be correct.oauth2/token
400 request which returnsinvalid_client
.oauth2/token
request (which I'm guessing is generated by the amplify js library), it's passing in the following parameters and headers: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