wohali / oauth2-discord-new

New Discord Provider for the OAuth 2.0 Client
MIT License
118 stars 22 forks source link

How to logout? #27

Closed stijnb1234 closed 3 years ago

stijnb1234 commented 3 years ago

I want to provide a logout button. But how?

What is the best way to store the token, and what is the best way to destroy the session?

wohali commented 3 years ago

Hi @stijnb1234 , thanks for asking.

All this library does is give you an access token. If you want to "log out," delete the token it gives you.

I can't make recommendations on your application architecture. Many people store token in some sort of database, such as CouchDB, PostgreSQL or MySQL. Others just cache these values in a more ephemeral key-value store like Redis. The choice is very application dependent.

Good luck with your project!