Skip to main content

🙋 (optional) User sign-in/up

info

If you don't know how to get the Trusted ID, check out the chapter 3. Verify users first.

Sign-in users

See if an account with this Trusted ID already exists. If an account exists, log the user in.

Example code
User.find({ta_verification_id}: ta_verification_id)
.exec(function (err: any, user: any) {
if(user) {
//an account with Trusted ID exists
//let this user sign in
}
}
tip

The simplest way to use Trusted Accounts is to get the user's Trusted ID and then use your own session mechanism to keep the user logged in. There is no need to access the Trusted Accounts Authentication APIs again.

Click the button below to check out the sign-in flow in a Figma click prototype.

Sign in with Trusted

Sign-up users

To sign up a user with Trusted Accounts, create an account containing the Trusted ID. Make sure that no other account with this Trusted ID exists yet.

Example code
User.find({ta_verification_id}: ta_verification_id)
.exec(function (err: any, user: any) {
if(!user) {
//no account with this Trusted ID exists yet
//create new account
}
}

Click the button to check out the sign-up flow in a Figma click prototype.

Sign up with Trusted