UserAuthenticationPolicy enum

Enum representing authentication policy for user creation/sign-in.

This enum defines the behavior when a user attempts to authenticate. It controls whether new users can be created, whether only existing users can sign in, or whether both operations are allowed.

Inheritance
Available extensions

Values

createNewOnly → const UserAuthenticationPolicy

Only allow creating new users.

Authentication will fail if a user with the provided credentials already exists. Use this when you want to ensure only new registrations are processed.

signInExistingOnly → const UserAuthenticationPolicy

Only allow signing in existing users.

Authentication will fail if no user exists with the provided credentials. Use this when you want to prevent new user creation and only allow existing users to sign in.

signInOrCreate → const UserAuthenticationPolicy

Allow signing in or creating new users.

If a user exists, they will be signed in. If no user exists, a new user will be created and signed in. This is the most flexible option for user authentication flows.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String

Available on UserAuthenticationPolicy, provided by the UserAuthenticationPolicyExtension extension

Returns the string value for the policy.
no setter

Methods

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

values → const List<UserAuthenticationPolicy>
A constant List of the values in this enum, in order of their declaration.