FacebookIdp class

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

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

The utils property provides access to FacebookIdpUtils, which contains utility methods for working with Facebook-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

FacebookIdp(FacebookIdpConfig config, {required TokenManager tokenManager, AuthUsers authUsers = const AuthUsers(), UserProfiles userProfiles = const UserProfiles()})
Creates a new instance of FacebookIdp.
factory

Properties

admin FacebookIdpAdmin
Admin operations to work with Facebook-backed accounts.
final
config FacebookIdpConfig
The configuration for the Facebook 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 FacebookIdpUtils
Utility functions for the Facebook identity provider.
final

Methods

hasAccount(Session session) Future<bool>
Determines whether the current session has an associated Facebook account.
login(Session session, {required String accessToken, Transaction? transaction}) Future<AuthSuccess>
Validates a Facebook access token and either logs in the associated user or creates a new user account if the Facebook 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 Facebook identity provider.