-
Notifications
You must be signed in to change notification settings - Fork 232
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
sameWindow oauth login does not fire auth:login-success event #198
Comments
+1 In my code I am listening to the auth:login-success event to change the state, so when a user logs in through OAuth and the sameWindow is used the user never reaches the intended post login state. |
+1 we have the same problem :( |
+1 we have the same problem. I think the problem is inside omniauth controller generating a bad url path that redirected us to a bad page. |
i think this issue is resolved now, correct @nbrustein ? can we close this if so? |
@angelxmoreno I don't think it's resolved. |
login-success is fired from submitLogin and handlePostMessage, but when using the sameWindow option with oauth login, the validation happens through validateToken, and
login-success
never gets fired.A workaround in some cases is to watch for the
auth:validation-success
event, but that gets fired when a user is validated, not only when they login. (So if a user has credentials stored in a cookie or local storage when they first open the page, validation-success will be fired, even though they never logged in.Seems like it should be safe for validateUser to fire the login-success event if it is in the block that is pulling credentials off of the location.search() params, but I haven't thought about it all that hard.
The text was updated successfully, but these errors were encountered: