Abrova
☰ Docs menu · Magic link

Magic Link

Passwordless sign-in by e-mail with Abrova Auth. The user enters an e-mail, opens the one-time link (15 minutes, single use) and is signed in; the account is created on first use.

Last updated: 27 Oct 2026
Magic link.

The user types an e-mail address and receives a sign-in link. Opening it brings them back to your app with a one-time token, which the SDK trades for a session. No password to remember; the account is created the first time the address signs in.

Set it up in the Console#

  1. Abrova Auth › Sign-in methods: turn on Magic link.
  2. Abrova Auth › Settings › Link addresses: add the address the link opens, for example https://example.com/auth/magic or myapp://auth/magic.

On mobile, make that address open your app: a custom URL scheme, or an Apple universal link / Android App Link for an https:// address.

dart
// Flutter
await AbrovaAuth.instance.sendMagicLink(email, redirectUrl: 'myapp://auth/magic');
swift
// iOS
try await AbrovaAuth.shared.sendMagicLink(email: email, redirectURL: "myapp://auth/magic")
kotlin
// Android
AbrovaAuth.shared.sendMagicLink(email, redirectUrl = "myapp://auth/magic")
typescript
// Web and React Native
await auth.sendMagicLink({ email, redirectUrl: 'https://example.com/auth/magic' });

The answer is the same whether or not the address has an account. Tell the user to check their inbox.

The link opens <redirectUrl>?token=.... Read the token and sign in:

dart
// Flutter: token from the incoming link
await AbrovaAuth.instance.signInWithMagicLink(Uri.parse(link).queryParameters['token']!);
swift
// iOS: pass the URL the app was opened with
try await AbrovaAuth.shared.signInWithMagicLink(url: openedURL)
kotlin
// Android: from the intent that opened the activity
AbrovaAuth.tokenFromLink(intent.dataString ?: "")?.let { AbrovaAuth.shared.signInWithMagicLink(it) }
typescript
// Web
const token = new URL(location.href).searchParams.get('token');
if (token) await auth.signInWithMagicLink({ token });

The first sign-in with an address creates the user, with the e-mail marked as verified. Later links sign in to the same user.

Rules#

RuleValue
Link lifetime15 minutes
UsesOnce. A second open fails with TOKEN_INVALID
E-mails per addressA few per hour
Link addressesOnly the ones you allowed; anything else fails with INVALID_INPUT

A magic-link user and an e-mail-and-password user with the same address are the same user: the link proves the address. Users signed in with Apple or Google are separate, even with the same address.

Errors#

CodeMeaning
TOKEN_INVALIDThe link is invalid, already used, or older than 15 minutes. Send a new one.
INVALID_INPUTNot a valid e-mail, or the redirectUrl is not one of your link addresses.
RATE_LIMITEDToo many links for this address or from this place. Try again after retryAfterSec.
USER_DISABLEDYou disabled this user in the Console.
NOT_CONFIGUREDE-mail delivery is temporarily unavailable.
METHOD_DISABLEDMagic link is off for the project.
Was this page helpful?
Report a problem