st4lk / django-rest-social-auth

OAuth signin with django rest framework
MIT License
519 stars 122 forks source link

Docs suggestion #172

Closed Dufran closed 11 months ago

Dufran commented 1 year ago

Hello, many thanks for awesome library. As an improvement idea, maybe you can add some flowchart diagram for auth flow with FE site. There is built in support of mermaid diagrams, so you can directly use something like this.

flowchart TD
site{{User open site}}-->
google_sign_in_button{{User click sign in with social network button}}-->
fe_redirect{{FE redirect user to oauth url}}--Parameters: \n client_id: \n redirect_uri-->
user_sign_in{{User sign in with account, or asked login and password on Social network site}}--Returns: \n code-->
user_redirected{{User get's redirected to FE page with code in request header}}-->
fe_login{{FE login user \n POST api/social/jwt-pair/provider/ \n code: \n redirect_uri:}}--Returns \n access_token \n refresh_token-->
fe_store_tokens{{FE store access and refresh tokens for further use}}

It will help to more precise describe flow and in/outs on each stage