I’d suggest looking a the oauth2 flow. What you described sounds like 90% of the flow they use for external authentification.
I’d suggest looking a the oauth2 flow. What you described sounds like 90% of the flow they use for external authentification.