UserPasswordAuthProviderClient
public protocol UserPasswordAuthProviderClient
A protocol defining methods for interacting with username/password authentication provider in Stitch.
-
Registers a new email identity with the username/password provider, and sends a confirmation email to the provided address.
Declaration
Swift
func register(withEmail email: String, withPassword password: String, completionHandler: @escaping (StitchResult<Void>) -> Void)Parameters
withEmailThe email address of the user to register.
withPasswordThe password that the user created for the new username/password identity.
completionHandlerThe handler to be executed when the request is complete.
-
Confirms an email identity with the username/password provider.
Declaration
Swift
func confirmUser(withToken token: String, withTokenID tokenID: String, completionHandler: @escaping (StitchResult<Void>) -> Void)Parameters
withTokenThe confirmation token that was emailed to the user.
withTokenIDThe confirmation token id that was emailed to the user.
completionHandlerThe handler to be executed when the request is complete.
-
Re-sends a confirmation email to a user that has registered but not yet confirmed their email address.
Declaration
Swift
func resendConfirmation(toEmail email: String, completionHandler: @escaping (StitchResult<Void>) -> Void)Parameters
toEmailThe email address of the user to re-send a confirmation for.
completionHandlerThe handler to be executed when the request is complete.
-
Sends a password reset email to the given email address.
Declaration
Swift
func sendResetPasswordEmail(toEmail email: String, completionHandler: @escaping (StitchResult<Void>) -> Void)Parameters
toEmailThe email address of the user to send a password reset email for.
completionHandlerThe handler to be executed when the request is complete.
-
Resets the password of an email identity using the password reset token emailed to a user.
Declaration
Swift
func reset(password: String, withToken token: String, withTokenID tokenID: String, completionHandler: @escaping (StitchResult<Void>) -> Void)Parameters
passwordThe desired new password.
withTokenThe password reset token that was emailed to the user.
withTokenIDThe password reset token id that was emailed to the user.
completionHandlerThe handler to be executed when the request is complete.
UserPasswordAuthProviderClient Protocol Reference