FrappeOAuthClient class
Simplified main client for Frappe OAuth2 authentication
Provides a clean, headless OAuth2 authentication flow:
- Authorization code flow with PKCE
- Token exchange and refresh
- User information retrieval
- SharedPreferences storage
Properties
- config → OAuthConfig
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → Future< void> - Disposes of the client and cleans up resources
-
getAccessToken(
) → Future< String?> - Gets the current access token
-
getCurrentUser(
) → Future< UserInfo?> - Gets the current user info
-
isAuthenticated(
) → Future< bool> - Checks if user is currently authenticated
-
login(
) → Future< AuthResult> - Initiates the OAuth2 login flow
-
logout(
) → Future< void> - Logs out the current user
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refreshToken(
) → Future< TokenResponse?> - Refreshes the access token
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
{required OAuthConfig config}) → Future< FrappeOAuthClient> - Factory constructor to create a properly initialized client