auth/models/sso library

Classes

SsoCallbackError
Sign-in failed before the app regained control.
SsoCallbackExchange
Sign-in produced a one-time code to exchange for tokens.
SsoCallbackNone
No SSO parameters were present at all.
SsoCallbackOutcome
What the query parameters on an SSO callback URL turned out to mean.
SsoLinkDto
Request body for POST /api/auth/oauth/link.
SsoLoginOptions
Optional settings for SSO sign-in.
SsoProviderInfo
A provider as reported by GET /api/auth/oauth/providers.

Enums

SSO
Single sign-on providers supported by the Appstrax Auth API.

Constants

ssoCallbackPath → const String
Path, relative to the API URL, that the Appstrax API serves for native apps.
ssoLinkRequiredStatus → const String
Status the API reports when the Google account's email already belongs to a password account, so the user has to prove ownership before it is linked.

Functions

defaultSsoRedirectUri(String apiUrl) → String
The default return URL for SSO: {apiUrl}/sso-callback.
parseSsoProviders(dynamic json) → List<SsoProviderInfo>
Reads the body of GET /api/auth/oauth/providers.
resolveSsoCallbackParams({String? code, String? status, String? error}) → SsoCallbackOutcome
Interprets the query parameters the API redirects back with.
validateAuthorizationUrl(dynamic authorizationUrl) → String
Checks the URL the API told us to open before it is handed to the system browser.
validateSsoRedirectUri(String redirectUri) → void
Rejects redirect URIs the API would refuse, so a misconfigured app fails with a clear message here instead of an opaque error from the server.