Use the same callback for login and link authentication endpoints.

Persist action with state parameter.