Skip to content
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

Open
nbrustein opened this issue Aug 24, 2015 · 5 comments
Open

sameWindow oauth login does not fire auth:login-success event #198

nbrustein opened this issue Aug 24, 2015 · 5 comments

Comments

@nbrustein
Copy link
Contributor

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.

@abhayastudios
Copy link

+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.

@gee-forr
Copy link

+1 we have the same problem :(

@shawncmu
Copy link

+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.

@angelxmoreno
Copy link
Contributor

i think this issue is resolved now, correct @nbrustein ? can we close this if so?

@dgoradia
Copy link

@angelxmoreno I don't think it's resolved. auth:login-success still not firing in 0.0.29 and devise_token_auth 0.1.37.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants