GoogleIdp class

Main class for the Google identity provider. The methods defined here are intended to be called from an endpoint.

The admin property provides access to GoogleIdpAdmin, which contains admin-related methods for managing Google-backed accounts.

The utils property provides access to GoogleIdpUtils, which contains utility methods for working with Google-backed accounts. These can be used to implement custom authentication flows if needed.

If you would like to modify the authentication flow, consider creating custom implementations of the relevant methods.

Constructors

GoogleIdp(GoogleIdpConfig config, {required TokenIssuer tokenIssuer, AuthUsers authUsers = const AuthUsers(), UserProfiles userProfiles = const UserProfiles()})
Creates a new instance of GoogleIdp.
factory

Properties

admin GoogleIdpAdmin
Admin operations to work with Google-backed accounts.
final
config GoogleIdpConfig
The configuration for the Google identity provider.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
utils GoogleIdpUtils
Utility functions for the Google identity provider.
final

Methods

login(Session session, {required String idToken, required String? accessToken, Transaction? transaction}) Future<AuthSuccess>
Validates a Google ID token and either logs in the associated user or creates a new user account if the Google account ID is not yet known.
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

Constants

method → const String
The method used when authenticating with the Google identity provider.