EndpointEmailIdpBase class abstract Endpoint

Base endpoint for email-based accounts.

Uses serverpod_auth_session for session creation upon successful login, and serverpod_auth_profile to create profiles for new users upon registration.

Subclass this in your own application to expose an endpoint including all methods. For further details see https://docs.serverpod.dev/concepts/working-with-endpoints#inheriting-from-an-endpoint-class-marked-abstract Alternatively you can build up your own endpoint on top of the same business logic by using EmailIdp.

Inheritance

Constructors

EndpointEmailIdpBase(EndpointCaller caller)

Properties

caller EndpointCaller
Holds a reference to the caller class.
finalinherited
client ServerpodClientShared
Reference to the client.
latefinalinherited
hashCode int
The hash code for this object.
no setterinherited
name String
The name of the endpoint this reference is connected to.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<SerializableModel>
Stream of messages sent from an endpoint that supports streaming.
no setterinherited

Methods

finishPasswordReset({required String finishPasswordResetToken, required String newPassword}) Future<void>
Completes a password reset request by setting a new password.
finishRegistration({required String registrationToken, required String password}) Future<AuthSuccess>
Completes a new account registration, creating a new auth user with a profile and attaching the given email account to it.
login({required String email, required String password}) Future<AuthSuccess>
Logs in the user and returns a new session.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetStream() → void
Resets web socket stream, so it's possible to re-listen to endpoint streams.
inherited
sendStreamMessage(SerializableModel message) Future<void>
Sends a message to the endpoint's stream.
inherited
startPasswordReset({required String email}) Future<UuidValue>
Requests a password reset for email.
startRegistration({required String email}) Future<UuidValue>
Starts the registration for a new user account with an email-based login associated to it.
toString() String
A string representation of this object.
inherited
verifyPasswordResetCode({required UuidValue passwordResetRequestId, required String verificationCode}) Future<String>
Verifies a password reset code and returns a finishPasswordResetToken that can be used to finish the password reset.
verifyRegistrationCode({required UuidValue accountRequestId, required String verificationCode}) Future<String>
Verifies an account request code and returns a token that can be used to complete the account creation.

Operators

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