-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
signIn
to open flow in a pop-up or new tab
#460
Comments
I think I'm facing the same issue, and am not receiving a redirect of any sort either (though that might be slightly unrelated). I've posted about it in the Discussions as well as on StackOverflow |
Are there any news on this issue? :) |
After some discuss with @phamhieu on the discord, here is the real problem: the You still have the possibility to get the data using client.auth.onAuthStateChange((_, session) => {
setUser(session.user) // Example with React's hooks, just reassign your logged user here
}) |
With my use-case, I believe it's because I use a popup window. I can't let my main window redirect or reload because I need to preserve state (users can work offline, then login to save and continue working). Consequently, I have a popup window handling Github auth, and inside the popup-window it redirects to /auth/success which displays a success screen before closing itself. It used to also pass the session back to the main window, but that no longer works (it worked a week or two ago iirc). |
moving this to the backend repo |
Has anyone found a solution for this year? I've seen various threads regarding the same issue with no solution in place |
@praj18 not really a solution, but an explanation from I believe one of the team members to a StackOverflow post I made back in July. |
Hey everyone, i think this can be partially solved by just opening the OAuth provider in a separate tab rather than in the current window.
This seems like expected behaviour. If the user hasn't completed the oauth login flow yet, no user object should be returned. One other thing to note is that |
signIn
to open flow in a pop-up or new tab
I moved this ticket from the GoTrue repo to here, and changed the title to make it clearer. This should be added to the library whenever we can get to it. |
With #566 this is probably going to become somewhat possible. Keeping the issue open as we need a proper API to launch the flow in a new tab / popup. |
Also #575 may make this even more possible. |
closing this issue because you can set |
So we're to implement the closing of the popup window and the communication back to the main window. Shouldn't this be very basic supported behavior? |
Bug report
Describe the bug
Signin with a provider redirects the user to the associated provider. Problem: because the user didn't accept to login with his provider's account, we can't get the user, and because the redirection is happening after
So the user still "null"
To Reproduce
Expected behavior
Do not make any redirection. The best is probably to open all redirection in another windows, and when the user signins using the provider, then after that making the redirection if needed.
System information
The text was updated successfully, but these errors were encountered: