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

Revoke access token #3758

Closed
sebgie opened this issue Aug 12, 2014 · 2 comments · Fixed by #3908
Closed

Revoke access token #3758

sebgie opened this issue Aug 12, 2014 · 2 comments · Fixed by #3908
Labels
affects:api Affects the Ghost API
Milestone

Comments

@sebgie
Copy link
Contributor

sebgie commented Aug 12, 2014

oAuth access tokens are stored in the database and are not revoked when signing out. This is not covered by the original oAuth specification. The behaviour is similar to what you experience when using session cookies and close your browser. The cookie still exists on the server, but is removed from the browser and you can't access server resources anymore. RFC 7009 adds a new endpoint to the OAuth specification and allows to revoke access and refresh tokens that are no longer needed.

ember-simple-auth has added the ability to revoke tokens in mainmatter/ember-simple-auth#228. It seems like we only need to add a configuration item to enable token revocation in the client. On the server, a new endpoint (/ghost/api/v0.1/authentication/revoke) needs to be implemented.

@sebgie sebgie added the api label Aug 12, 2014
@ErisDS ErisDS added this to the 0.5.x Feature Release milestone Aug 12, 2014
@novaugust
Copy link
Contributor

Check out this convo with Alxandr in ze logs. Is that from what you're describing here sebgie?

@sebgie
Copy link
Contributor Author

sebgie commented Aug 14, 2014

@novaugust no, this is not related. This issue is solely about removing the access and refresh tokens form the database when someone signs out. The IRC conversation is related to #3492 which is about handling session expiry more gracefully.

halfdan added a commit to halfdan/Ghost that referenced this issue Sep 10, 2014
closes TryGhost#3758
- new API method to delete access and refresh token
- use new ember-simple-auth config to revoke tokens on logout
- new method to delete tokens by .. token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:api Affects the Ghost API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants