We’ve migrated our documentation to a new site, which means some URLs have changed.
Subscriptions

How to get a user's password status

The password status of a user can be retrieved on the front-end by running the following code:

tp.pianoId.getUser().passwordType

The tp.pianoId.getUser() method will only return a value when a user is authenticated, otherwise, it the response will be null.

The passwordType property has three potential values:

password - The user has an active password.

passwordless - The user is a passwordless user.

passwordExpired - The user has an inactive password that must be reset for them to sign in.

If you'd like to prompt passwordless users to set a password, e.g. by showing a custom form to them, the following conditional should be added to a RunJS card.

if(tp.pianoId.getUser().passwordType === "passwordless") {
// trigger custom form
}

Last updated: