changePin
Once authenticated, a user is able to change their PIN. Changing a user's PIN is done via an AuthenticationHandler
![copy link to clipboard](../../../../../theme/img/icon-link.svg)
onegini.user.changePin
This functions takes no arguments, as it is executed for the currently authenticated user. After calling this method, you will need to supply an onPinRequest
and onCreatePinRequest
callback. These callbacks will verify the current PIN and create a new one.
If the flow fails completely (e.g. the user is deregistered as a result of exceeding the maximum number of allowed PIN entries), the onError
callback will be called with an error object.
Example code changing a user's PIN:
The error callback contains an object with these properties:
Property | Example | Description |
---|---|---|
code |
8012 | The error code |
description |
"Onegini: Incorrect PIN" | Human readable error description |