Skip to main content

🙋 User sign-in/up

To sign in or sign-up users with Trusted Accounts on your platform, you just need to get the Trusted ID as we did in the user verification.

tip

The easiest way to use Trusted Accounts is to just get the users Trusted ID and then use your own session mechanism to keep the user logged in. There is no need for accessing Trusted Accounts Authentication APIs again.

info

If you don't know how to get the Trusted ID, make sure to check out the chapter User verification first.

Sign-up users

To sign up a user with Trusted Accounts, just create a profile containing the anonymous Trusted ID you just received. 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

Sign-in users

After you got the Trusted ID of a user, check 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
}
}

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

Sign in with Trusted