-
Notifications
You must be signed in to change notification settings - Fork 3
Sequence Diagram
kimsungwon edited this page Nov 28, 2023
·
12 revisions
sequenceDiagram
participant Browser
participant mrc-api
participant Google
Browser ->> +mrc-api: Initiate sign-in request
activate Browser
activate Browser
mrc-api ->> mrc-api: Generate anti-forgery state
mrc-api ->> -Browser: Provide authentication URL
deactivate Browser
Browser ->> +Google: Request user authentication
activate Browser
Google ->> -Browser: Return sign-in redirect URL and authorization code
deactivate Browser
Browser ->> +mrc-api: Request sign-in with authorization code
activate Browser
mrc-api ->> mrc-api: Confirm state token
mrc-api ->> +Google: Request access token and ID token
activate mrc-api
Google ->> Google: Validate authorization code
Google ->> -mrc-api: Return access token and ID token
deactivate mrc-api
mrc-api ->> mrc-api: Build user token
mrc-api ->> -Browser: Provide user token cookie and redirect URL
deactivate Browser
deactivate Browser
sequenceDiagram
participant Browser
participant mrc-api
Browser ->>+ mrc-api: Request sign-out
activate Browser
mrc-api ->>- Browser: Clear cookie
deactivate Browser