AuthCategoryUserBehavior
public protocol AuthCategoryUserBehavior : AnyObject
-
getCurrentUser()AsynchronousRetrieve the current logged in user
Declaration
Swift
func getCurrentUser() async throws -> any AuthUserReturn Value
Current logged in user
-
fetchUserAttributes(options:Asynchronous) Fetch user attributes for the current user.
Declaration
Swift
func fetchUserAttributes( options: AuthFetchUserAttributesRequest.Options? ) async throws -> [AuthUserAttribute]Parameters
optionsParameters specific to plugin behavior
-
update(userAttribute:Asynchronousoptions: ) Update user attribute for the current user
Declaration
Swift
func update( userAttribute: AuthUserAttribute, options: AuthUpdateUserAttributeRequest.Options? ) async throws -> AuthUpdateAttributeResultParameters
userAttributeAttribute that need to be updated
optionsParameters specific to plugin behavior
-
update(userAttributes:Asynchronousoptions: ) Update a list of user attributes for the current user
Declaration
Swift
func update( userAttributes: [AuthUserAttribute], options: AuthUpdateUserAttributesRequest.Options? ) async throws -> [AuthUserAttributeKey: AuthUpdateAttributeResult]Parameters
userAttributesList of attribtues that need ot be updated
optionsParameters specific to plugin behavior
-
resendConfirmationCode(forUserAttributeKey:Asynchronousoptions: ) Resends the confirmation code required to verify an attribute
Declaration
Swift
@available(*, deprecated, renamed: "sendVerificationCode(forUserAttributeKey:options:﹚") func resendConfirmationCode( forUserAttributeKey userAttributeKey: AuthUserAttributeKey, options: AuthAttributeResendConfirmationCodeRequest.Options? ) async throws -> AuthCodeDeliveryDetailsParameters
userAttributeKeyAttribute to be verified
optionsParameters specific to plugin behavior
-
sendVerificationCode(forUserAttributeKey:Asynchronousoptions: ) Sends the verification code required to verify an attribute
Declaration
Swift
func sendVerificationCode( forUserAttributeKey userAttributeKey: AuthUserAttributeKey, options: AuthSendUserAttributeVerificationCodeRequest.Options? ) async throws -> AuthCodeDeliveryDetailsParameters
userAttributeKeyAttribute to be verified
optionsParameters specific to plugin behavior
-
confirm(userAttribute:AsynchronousconfirmationCode: options: ) Confirm an attribute using confirmation code
Declaration
Swift
func confirm( userAttribute: AuthUserAttributeKey, confirmationCode: String, options: AuthConfirmUserAttributeRequest.Options? ) async throwsParameters
userAttributeAttribute to verify
confirmationCodeConfirmation code received
optionsParameters specific to plugin behavior
-
update(oldPassword:Asynchronousto: options: ) Update the current logged in user’s password
Check the plugins documentation, you might need to re-authenticate the user after calling this method.
Declaration
Swift
func update( oldPassword: String, to newPassword: String, options: AuthChangePasswordRequest.Options? ) async throwsParameters
oldPasswordCurrent password of the user
newPasswordNew password to be updated
optionsParameters specific to plugin behavior
View on GitHub