Closed MensurRasic closed 3 weeks ago
@MensurRasic Thanks for reaching out. Just wanted to confirm are you following our docs here already for building up your app?
Yes I did, but the documentation you shared is for Gen 1, I’m on Gen 2. But I followed Gen 2 documentation as well and it’s still not working.
@MensurRasic, can you confirm that you're importing the import 'aws-amplify/auth/enable-oauth-listener';
on the client side page where your redirect for http://localhost:8082/dashboard/
is? Also, any frontend code you can provide for your authentication flows would be helpful for us to better identify the root cause here.
Closing this issue as we have not heard back from you. If you are still experiencing this, please feel free to reply back and provide any information previously requested and we'd be happy to re-open the issue.
Thank you!
Before opening, please confirm:
JavaScript Framework
Next.js
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
Amplify Gen 2 (Preview)
Environment information
Describe the bug
When I try to login with a provider such as google, using
await signInWithRedirect({ provider: 'Google' });
, the nextjs project is stuck at the moment I'm callingawait getCurrentUser()
right after I get redirected back to the project.I don't get any error triggered in my try catch nor the project doesn't want to continue the login process.
Here's my Amplify config :
Amplify.configure( { ...awsconfig, oauth: { ...awsconfig.oauth, redirectSignIn: 'http://localhost:8082/dashboard/', redirectSignOut: 'http://localhost:8082/', }, }, { ssr: true } );
I tried the following solutions but none of them works : 12873, 13456, 13472
Expected behavior
The user should be able to complete the login process using the authentication with google sign-in.
Reproduction steps
Setup a nextjs project with aws-amplify: ^6.6.4 and setup a google authentication. Try to login with the google authentication to the project.
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