finishRegistration method
Future<AuthSuccess>
finishRegistration(
- Session session, {
- required UuidValue accountRequestId,
- required String verificationCode,
Completes a new account registration, creating a new auth user with a profile and attaching the given email account to it.
Throws an EmailAccountRequestNotFoundException in case the
accountRequestId
does not point to an existing request.
Throws an EmailAccountRequestExpiredException in case the request's
validation window has elapsed.
Throws an EmailAccountRequestTooManyAttemptsException in case too many
attempts have been made at finishing the same account request.
Throws an EmailAccountRequestUnauthorizedException in case the
verificationCode
is not valid.
Returns a session for the newly created user.
Implementation
Future<AuthSuccess> finishRegistration(
final Session session, {
required final UuidValue accountRequestId,
required final String verificationCode,
}) async {
return AuthEmail.finishRegistration(
session,
accountRequestId: accountRequestId,
verificationCode: verificationCode,
);
}