Handle OAuth callback from provider. Exchanges authorization code for access token, fetches user info, creates or finds user, and redirects to app with a magic link token for authentication.
API Secret token
User Access token
App ID
OAuth authorization code
OAuth state parameter
redirect to app with magic link
Redirects to the app's login URL with magic link token
Redirect URL to app with magic link token parameter (sct_oauth)