Closed anuwat-th closed 1 month ago
Login with Google: {
shape: sequence_diagram
# --------------------------------------------------------
# https://d2lang.com/tour/sequence-diagrams#ordering
# Actors will appear from left-to-right as a, b, c, d...
Google Oauth
Login Page
Home Page # <-- necessary
Server
# --------------------------------------------------------
Google Oauth.t1 <- Login Page.t1: Request Google account data.
Google Oauth.t1 -> Login Page.t1: Response Google account data.
Login Page.t1 -> Login Page.t1: Query "email", "first name", "last name"\nfrom Google response
Login Page.t1 -> Server.t1: Request Login("refresh_token","email""first name", "last name")
Server.t1 -> Server.t1: Check "email" is existing of not?
alt: {
"[is existing]": {
Server.t1 -> Server.t1: Create new "reflesh_token"
Login Page.t2 <- Server.t1: Response ("refresh_token")
Server.t1 -> Server.t1: Set inactive available for previous "reflesh_token"
Login Page.t2 -> Home Page: what did you have for lunch?
}
"[else]": {
Server -> Login Page: that's personal
}
}
}
i don't know, why not accept both d2-sources?
Regardless, there should be better error messages so this is a bug
https://play.d2lang.com/?script=jJLNbuJAEITvfoqSL7tIgMQerRUc9rB7WGl_OCYR6thtz4jxjDPTNkER7x4ZbIL5SXJsq_qrqmn_doW22GhR-OlcYTjBSwQERRUnCPxUs015lWkqPJUROhX-UC1qKjN8n-DA-EsFT2WW4H-7FKRXUpq62goyEppGVwiT-SUhVM4GvokY6K8A_tXst4i5JG3iMeJc-yCwVHI7GeqHe5t7V_Y2vrO96rBk37AfFNxrvsaec89BrcSt2cbjzvWm56jFH2ln6B-K03UfHDqAn3UQbQu4HNbJIgLIyOFIQHx3InmI-8_v8D2TMCxv0OY2b7m7xdPe39rjDnp3ZznvPPrAdckCbSkV3TCoIW3o0TBy51F5brSrw6fiTOb45Urezwk2igSZzrB1NRQ1B6CpbaoW-_Vd90ZsAl8-zvC3SSCK5EtAxT44S-ZI2EW76DUAAP__&theme=1&sketch=0&layout=dagre&