Closed gstaykov closed 7 months ago
Hello, @gstaykov and sorry to hear you're experiencing this. Saw that it was potentially related to 9721 (linked above), but want to try and understand what's happening a little better.
Can you help me understand how the Auth resources were initially setup by clarifying if you were following this documentation for a Next.JS app via the Amplify CLI? If so, were the redirect sign-in URI’s set to (and remain to be possibly) http://localhost:3000/
? Thanks!
Hello, @gstaykov and sorry to hear you're experiencing this. Saw that it was potentially related to 9721 (linked above), but want to try and understand what's happening a little better.
Can you help me understand how the Auth resources were initially setup by clarifying if you were following this documentation for a Next.JS app via the Amplify CLI? If so, were the redirect sign-in URI’s set to (and remain to be possibly)
http://localhost:3000/
? Thanks!
… I explicitly wrote in my ticket that I change the redirect URLs before every deploy.
Yes, I was following your official documentation during the setup.
Hi @gstaykov i've tried to reproduce this but haven't been able to do so. Could you clarify the steps you are taking when you say:
I'm testing on localhost and production with the same cognito user pool
Im assuming you are using the same backend between local and production, however are you authenticating success fully in production? What happens when you signIn()
?
If you read my initial post you will find out the answer "This is the page that is opened after successful login" So yes, the login is successful, the redirect after the login is ok, but the session
object is not populated.
Your product is very buggy and hard to work with. That's why I switched to Google Firebase. I can't provide you with any examples because I scraped all the code trying to make amplify to work (it was more than a month ago)
@gstaykov I'll go ahead and mark this issue as closed for now then. If you have any additional or new questions please feel free to submit a new github issue.
Thanks!
Before opening, please confirm:
JavaScript Framework
React, Next.js
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
None
Environment information
Describe the bug
I'm testing on localhost and production with the same cognito user pool (changing 'Allowed callback URLs' and 'Allowed sign-out URLs' between tests to get the proper redirect after successful login).
This is the page that is opened after successful login:
On localhost
session
object is populated and everything works just fine but when I deploy this in production I get an empty session object:I'm testing login with Google and Facebook and again I'm using the SAME user pool for both localhost and prod. I change only the callback URLs in Cognito between the tests