Appearance
authLoginOauth / oauthLoginHook
Finalizes an OAuth login after the provider redirects back into BetterForms.
authLoginOauth finalizes an OAuth login after the user returns from the provider callback.
oauthLoginHook is a legacy alias that is still supported.
Typical Flow
- User clicks a button that navigates to
/oauth/{provider}. - The provider authenticates the user.
- BetterForms redirects back to your page with the slug
auth/oauth. - That page runs
authLoginOauth, usually inonFormLoad. - BetterForms stores the login token and continues through the normal login flow.
Action Object
json
{
"action": "authLoginOauth"
}Notes
- This action is usually run automatically on the OAuth callback page.
- Use
authLoginOauthas the preferred action name for new work. - If the OAuth provider returns an error, BetterForms surfaces it through the normal error pipeline as
10160/auth.oauth_failed. - A disabled account uses
10163/auth.account_disabledand keeps the server sentence. - This action does not need any custom options.