wagnerdelima / drf-social-oauth2

drf-social-oauth2 makes it easy to integrate Django social authentication with major OAuth2 providers, i.e., Facebook, Twitter, Google, etc.
https://drf-social-oauth2.readthedocs.io/en/latest/
MIT License
271 stars 34 forks source link

How login and logout views should be #136

Closed FarhangAmaji closed 2 years ago

FarhangAmaji commented 2 years ago

How login and logout views should be? is the anything related to tokens (like generating and returning token) or user model like (logout(request) or authenticate(request, username=username, password=password)) should be done in login and logout views? can you provide some examples?

wagnerdelima commented 2 years ago

If by Login you mean creating an auth token, please view the convert-token endpoint. In order to sign the user out, you need to send a request to the revoke-token/ endpoint. This way, a user's token will be removed and its permissions revoked. You can see both endpoints by running swagger via docker: https://github.com/wagnerdelima/drf-social-oauth2#run-swagger-editor.