WebAuthentication class

An interface for authenticating users using the Auth0 Universal Login page.

Authentication using Universal Login works by redirecting your user to a login page hosted on Auth0's servers. To achieve this on a native device, this class uses the Auth0.Android and Auth0.Swift SDKs on Android and iOS/macOS respectively to perform interactions with Universal Login.

It is not intended for you to instantiate this class yourself, as an instance of it is already exposed as Auth0.webAuthentication.

Usage example:

final auth0 = Auth0('DOMAIN', 'CLIENT_ID');
final result = await auth0.webAuthentication.login();
final accessToken = result.accessToken;

Constructors

WebAuthentication(Account _account, UserAgent _userAgent, String? _scheme, CredentialsManager? _credentialsManager)

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

login({String? audience, Set<String> scopes = const {'openid', 'profile', 'email', 'offline_access'}, String? redirectUrl, String? organizationId, String? invitationUrl, bool useHTTPS = false, bool useEphemeralSession = false, Map<String, String> parameters = const {}, IdTokenValidationConfig idTokenValidationConfig = const IdTokenValidationConfig(), SafariViewController? safariViewController}) Future<Credentials>
Redirects the user to the Auth0 Universal Login page for authentication. If successful, it returns a set of tokens, as well as the user's profile (constructed from ID token claims).
logout({String? returnTo, bool useHTTPS = false}) Future<void>
Redirects the user to the Auth0 Logout endpoint to remove their authentication session, and log out. The user is immediately redirected back to the application once logout is complete.
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