weavejester / ring-oauth2

OAuth 2.0 client middleware for Ring
146 stars 38 forks source link

Logout Flow #38

Closed MyriaCore closed 4 years ago

MyriaCore commented 4 years ago

Hi, I'm kinda new to developing webapps, so forgive me if this functionality is already present, as I could easily just be unaware of the current ways to implement it.

I'm using ring-oauth2 to implement a "login with "-style login flow. Login works perfectly, but I'd like to implement a logout flow as well. This'd ideally just stop providing the :oauth2/access-tokens entry. This might be possible through an :exit-uri / :session-destroy-uri / :logout-uri profile key.

weavejester commented 4 years ago

You should clear the session when a user logs out, and this will remove the access tokens entry as well (since it's kept in the session).

MyriaCore commented 4 years ago

You're 100% right, I'm sorry to bother you. Thanks so much for the wonderful library!