Passkey Signup
It is possible to create wallets for users using just a passkey. This is useful for creating wallets for users if you don't want to go through the email OTP or magic link flow.
Authenticate a user with email and passkey
If you want to allow sign-up and login with a passkey, you can ask the user for an email to associate with their passkey. This way, they can log in with their email or passkey in the future. Under the hood, the email is also used to check if an account exists already so you can have a unified sign-up and login flow.
example.ts
import { signer } from "./signer";
const result = await signer.authenticate({
type: "passkey",
email: "user@mail.com",
});
Authenticate a user
example.ts
import { signer } from "./signer";
const result = await signer.authenticate({
type: "passkey",
createNew: true,
username: "SOME_USER_NAME_OR_PASSKEY_IDENTIFIER",
});