MagicLinkPlugin<TContext> class final

Opt-in email magic-link server plugin.

The plugin contributes provider metadata and host-owned route contracts. Durable token replacement and token/user consumption are delegated to the required AuthMagicLinkBackend. Email delivery and host session/cookie issuance happen after those backend commits and are intentionally not part of the database transaction.

Inheritance
Implemented types

Constructors

MagicLinkPlugin({String id = 'email', String name = 'Email', required AuthMagicLinkSender<TContext> sendMagicLink, Duration tokenExpiry = const Duration(minutes: 15), String tokenGenerator()?})

Properties

authenticationMethodKinds Set<AuthAuthenticationMethodKind>
no setteroverride
authenticationMethodNamespace String
no setteroverride
authenticationMethodStore Object
no setteroverride
backend AuthMagicLinkBackend
no setter
clientOperations Iterable<AuthClientOperationDescriptor>
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
hostEndpoints Iterable<AuthEndpointDescriptor<TContext>>
no setteroverride
id String
Provider identifier used in callback routes.
finalinherited
name String
Human-readable provider name.
finalinherited
persistenceSchemas Iterable<AuthPersistenceSchema>
no setteroverride
rateLimitOperations Iterable<AuthRateLimitOperation>
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
final
tokenExpiry Duration
final
tokenGenerator String Function()?
final
type AuthProviderType
Provider category.
finalinherited

Methods

authenticationMethodInventory(AuthStore store) AuthAuthenticationMethodInventoryContributor
Builds this provider's authoritative usable-method inventory.
override
authenticationMethodsForUser(String userId) Future<AuthAuthenticationMethodSnapshot>
override
configure(AuthServerPluginContext<TContext> context) → void
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
redacted() AuthProvider
Creates a provider metadata projection safe for events and audit logs.
inherited
sendVerification(AuthContext context, AuthEmailRequest request) Future<void>
override
toJson() Map<String, dynamic>
Summary payload used by /auth/providers.
inherited
toString() String
A string representation of this object.
inherited

Operators

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