-
Notifications
You must be signed in to change notification settings - Fork 153
Broadcast event oauth:tokenDestroy after a logout #45
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
Broadcast event oauth:tokenDestroy after a logout #45
Conversation
|
Actually, I think this could be the real logout event. If the logout is fired right now on "login" there is a logic mistake. Do you think you can we can clean up the logic before the merge?
|
|
I agree with you, but if the oauth:logout event is moved to another function, it might break some people's code already using it at page refresh. That is why I called this event tokenDestroy to make sure legacy code would still work until you decide to have a major version change. |
|
You have a good point. The thing is that people using the logout event will expect the real logout. I think this is acceptable "braking update". |
oauth:loggedOut when no access token
|
How about this? |
oauth:loggedOut when no access token
…to token_destroy_event
oauth:loggedOut when no access token
…to token_destroy_event
|
If the README is updated and the tests are passing, I think it's perfect. Can you confirm both of them? |
|
The tests are passing and I don't see any information in the README about the events. There is an Events section on the website, I could add the oauth:loggedOut event documentation there since the oauth:logout documentation there wouldn't change. I guess that would be a different pull request, I never sent a pull request for the gh-pages branch, but I could do it if you wish. |
|
Would ne perfect to integrate it. Palese send it.
|
Conflicts: dist/oauth-ng.js
Broadcast event oauth:tokenDestroy after a logout
|
Just missing the docs in the gh-pages branch. Whenever you have time :) |
|
Oh right, sorry, I will get on that once I get a minute later today. Thanks for merging this. |
I needed a different event for when a user manually logs out, this would work for me without breaking anything already in the library.