Skip to content

Instantly share code, notes, and snippets.

@vinayakg
Last active July 10, 2024 15:22
Show Gist options
  • Save vinayakg/338e6c6585754f346c6d59e9de03cbcc to your computer and use it in GitHub Desktop.
Save vinayakg/338e6c6585754f346c6d59e9de03cbcc to your computer and use it in GitHub Desktop.
OAuth Flow
@startuml
[Web Browser] --> [Service Provider] : Get /my-data
[Service Provider] --> [Web Browser]: Permit to authenticate with identity.com/oauth?
[Web Browser] --> [Identity Provider]: Can you authenticate me, use clientid, scope and give me Auth code
[Identity Provider] --> [Web Browser]: You are authenticated, authcode `code`
[Web Browser] -->[Service Provider]: Please use the code and fetch details
[Service Provider] -->[Identity Provider]: Use auth code, clientid, client secret and return access token
[Identity Provider]-->[Service Provider]: Take the access token
[Service Provider]-->[Identity Provider]: Take clientid, client secret, access token and return user details
[Identity Provider]-->[Service Provider]: Here is user profile
[Service Provider]--> [Web Browser]: here is the data you asked
@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment