AuthOwlClient class
Signs users in, keeps the session, and exposes account and organization actions.
Paths and methods come from conformance/client-surface.json, which is
derived from @authowl/core and drift-checked in CI, so this client and the
JavaScript one cannot silently disagree about the API they call.
Constructors
- AuthOwlClient({required String publishableKey, required String apiUrl, required AuthOwlStorage storage, Client? httpClient})
-
Build a client for a project.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- projectId → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- session → AuthOwlSessionStore
-
final
Methods
-
changePassword(
{required String currentPassword, required String newPassword, bool revokeOtherSessions = true}) → Future< AuthResult< Object?> > -
createOrganization(
{required String name, required String slug}) → Future< AuthResult< Object?> > -
dispose(
) → Future< void> -
getPublicConfig(
) → Future< AuthResult< AuthOwlPublicConfig> > - Fetch the publishable project policy used by managed auth screens.
-
getSession(
{bool force = false}) → Future< AuthOwlSessionState> -
listOrganizations(
) → Future< AuthResult< Object?> > -
listSessions(
) → Future< AuthResult< Object?> > -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestPasswordReset(
{required String email, String? redirectTo}) → Future< AuthResult< Object?> > -
resetPassword(
{required String token, required String newPassword}) → Future< AuthResult< Object?> > -
revokeSession(
{required String sessionId}) → Future< AuthResult< Object?> > - Revoke one session by its id.
-
sendEmailOtp(
{required String email}) → Future< AuthResult< Object?> > -
sendMagicLink(
{required String email, String? callbackURL}) → Future< AuthResult< Object?> > -
sendTwoFactorOtp(
) → Future< AuthResult< Object?> > -
sendVerificationEmail(
{required String email, String? callbackURL}) → Future< AuthResult< Object?> > -
setActiveOrganization(
{String? organizationId}) → Future< AuthResult< Object?> > -
signInWithEmail(
{required String email, required String password, bool rememberMe = true}) → Future< AuthResult< Object?> > -
signInWithEmailOtp(
{required String email, required String otp}) → Future< AuthResult< Object?> > -
signInWithIdToken(
{required String provider, required String idToken, String? accessToken, String? nonce}) → Future< AuthResult< Object?> > -
Social sign-in with a token from the provider's NATIVE SDK
(
google_sign_in,sign_in_with_apple). -
signInWithUsername(
{required String username, required String password, bool rememberMe = true}) → Future< AuthResult< Object?> > -
signOut(
) → Future< AuthResult< Object?> > - End the session server-side, then drop it locally.
-
signUpWithEmail(
{required String email, required String password, String? name, String? username, String? firstName, String? lastName, int? consentVersion}) → Future< AuthResult< Object?> > -
startPhoneOtp(
{required String phoneNumber, required String idempotencyKey, String? turnstileToken, Map< String, Object?> ? akedlyShield}) → Future<AuthResult< Object?> > -
toString(
) → String -
A string representation of this object.
inherited
-
updateProfile(
Map< String, Object?> fields) → Future<AuthResult< Object?> > -
verifyBackupCode(
{required String code}) → Future< AuthResult< Object?> > -
verifyPhoneOtp(
{required String phoneNumber, required String code}) → Future< AuthResult< Object?> > -
verifyTotp(
{required String code}) → Future< AuthResult< Object?> > -
verifyTwoFactorOtp(
{required String code}) → Future< AuthResult< Object?> >
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited