OAuthService class

OAuth service that handles the OAuth 2.0 authorization code flow with PKCE.

Supports two ways to get authorization codes:

  1. Automatic: Opens browser, redirects to localhost where we capture the code
  2. Manual: User manually copies and pastes the code

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

cleanup() → void
Clean up any resources.
handleManualAuthCodeInput({required String authorizationCode, required String state}) → void
Handle manual flow callback when user pastes the auth code.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startOAuthFlow({required Future<void> authURLHandler(String manualUrl, [String? automaticUrl]), Future<void> openBrowser(String url)?, bool loginWithNeomageAi = false, bool inferenceOnly = false, int? expiresIn, String? orgUUID, String? loginHint, String? loginMethod, bool skipBrowserOpen = false}) Future<OAuthTokens>
Start the OAuth flow.
toString() String
A string representation of this object.
inherited

Operators

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