Skip to main content
API Reference / modelence / client / loginWithOneTimeCode
loginWithOneTimeCode(options): Promise<null | User>
Defined in: packages/modelence/src/auth/client/index.ts:235 Complete a magic link sign-in by typing the one-time code from the email. Alternative to loginWithMagicLink() for contexts where clicking the link can’t reach the app — native apps without deep links, or when the email is read on a different device. Signs the user in — creating the account first when the email is not registered yet and the server enables auth.magicLink.allowSignup — and returns the logged-in user.

Example

Parameters

Returns

Promise<null | User>