AuthService class

Constructors

AuthService()
factory

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

getAccessToken() Future<String?>
Gets a valid access token, automatically handling refresh This should be used for all external API calls
getAccessTokenWithAuth(BuildContext context, {String? email, bool forceWebView = false}) Future<String?>
Gets a valid access token with automatic re-authentication This version requires BuildContext for UI navigation
getStoredEmail() Future<String?>
Gets the stored email address of the current user Returns null if no user is authenticated
getStoredUserId() Future<String?>
Gets the stored user ID of the current user Returns null if no user is authenticated
isIndiaKycCompleted() Future<bool>
Checks if Indian KYC documents have been added by the user Returns true if Indian KYC is completed, false otherwise
isUsKycCompleted() Future<bool>
Checks if US KYC documents have been added by the user Returns true if US KYC is completed, false otherwise
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openRemit2anyFullSite(BuildContext context, {String? tenant}) Future<Map<String, dynamic>?>
Convenience function to open the complete Remit2Any webview tenant - Optional tenant string to append to the default user agent email - Optional email to pre-fill in the authentication form context - The build context Returns: A Future that completes when the webview is closed
openWebViewPage(BuildContext context, String url, String title) Future<Map<String, dynamic>?>
Opens a WebView page with the specified URL
refreshTokens() Future<void>
Gets user information using automatic token management Returns null if token is invalid and refresh fails Gets user information with automatic re-authentication This version requires BuildContext for UI navigation if needed
signIn(BuildContext context, {String? email, bool forceWebView = false}) Future<Map<String, dynamic>?>
signOut(BuildContext context, {bool redirectToLogin = false}) Future<void>
Signs out the current user and clears all stored tokens and Cognito session
startTokenRefreshLoop() → void
toString() String
A string representation of this object.
inherited

Operators

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