Skip to Content
Documentation

Sign-in links

Verifies the sign-in link in the sign-in code email (links are created with the code, not requested on their own).

GET
/magic-link/verify

Verify magic link

Query Parameters

token?string

Verification token

callbackURL?string

URL to redirect after magic link verification, if not provided the user will be redirected to the root URL. Eg: "/dashboard"

errorCallbackURL?string

URL to redirect after error.

newUserCallbackURL?string

URL to redirect after new user signup. Only used if the user is registering for the first time.

Response Body

Success

application/json
  1. response
session?
user?
Example Request
curl -X GET 'https://auth.example.com/api/auth/magic-link/verify'
Example Response
{  "session": {    "id": "string",    "expiresAt": "2019-08-24T14:15:22Z",    "token": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "ipAddress": "string",    "userAgent": "string",    "userId": "string",    "impersonatedBy": "string",    "activeOrganizationId": "string",    "activeTeamId": "string",    "country": "string"  },  "user": {    "id": "string",    "name": "string",    "email": "string",    "emailVerified": false,    "image": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "role": "string",    "banned": false,    "banReason": "string",    "banExpires": "2019-08-24T14:15:22Z",    "username": "string",    "displayUsername": "string",    "twoFactorEnabled": false,    "phoneNumber": "string",    "phoneNumberVerified": true  }}