OAuthService class

A service that handles OAuth 2.0 authentication flow with PKCE support.

Constructors

OAuthService()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

buildOAuthFlow({required OAuthProvider provider, required void onCompleted(AuthorizationTokenResponse result), VoidCallback? onCancelled, void onError(Object error)?, Widget? loadingWidget, Color? backgroundColor}) Widget
Builds an OAuth WebView widget that emits callbacks for authorization lifecycle events.
getAuthorizationUrl(OAuthProvider provider) Future<String>
Generates an authorization URL for the OAuth flow.
getState() String
Returns the current state parameter for testing purposes
handleRedirect(String url, OAuthProvider provider) Future<AuthorizationTokenResponse?>
Handles the redirect URL after authorization.
logout(OAuthProvider provider, String idTokenHint) Future<bool>
Performs the logout process for the authenticated user.
performOAuthFlow(BuildContext context, OAuthProvider provider, {Widget? loadingWidget, Color? backgroundColor, void onError(String)?}) Future<AuthorizationTokenResponse?>
Performs the OAuth authentication flow using a WebView.
setHttpClient(Client client) → void
For testing purposes only