changePasswordWithoutUserInteraction(for:existingCredential:newPassword:userInfo:)
Upgrades a user’s weak password to a strong password.
Declaration
func changePasswordWithoutUserInteraction(for serviceIdentifier: ASCredentialServiceIdentifier, existingCredential: ASPasswordCredential, newPassword: String, userInfo: [AnyHashable : Any]? = nil)Parameters
- serviceIdentifier:
An identifier that represents a particular service that the user needs a credential for, like a web site.
- existingCredential:
The current password credential for the service.
- newPassword:
A new, automatically generated, strong password for the service to use.
- userInfo:
A dictionary that contains app-specific values when the request to upgrade to Sign in with Apple initiates from the parent app. If the request to upgrade to Sign in with Apple doesn’t initiate from the app, this parameter is
nil.
Mentioned in
Discussion
If the extension’s Info.plist file includes the ASAccountAuthenticationModificationPasswordGenerationRequirements key, the value of newPassword satisfies the specified requirements.