SkillhabitDocs

Authentication

Create login links and token-related entry points for external integrations.

POST
/auth

Creates a pre-signed Skillhabit login link for an existing user. Identify the user with either userId or email; userId takes precedence when both are supplied. The returned link includes the login secret and expires at the returned epoch-millis timestamp.

AuthorizationBearer <token>

A JSON Web Token

In: header

Query Parameters

redirectUri?string

Optional URL to continue to after the user has completed the login verification flow.

Default""

Request Body

application/json

User lookup for the sign-in link. Provide userId when known, otherwise provide email.

TypeScript Definitions

Use the request body type in TypeScript.

Identifier used to create a pre-signed login link for an existing user.

Response Body

application/json

curl -X POST "https://example.com/auth?redirectUri=https%3A%2F%2Fdemo.skillhabit.com%2Flearn" \  -H "Content-Type: application/json" \  -d '{}'
{  "preSignedInLink": "string",  "expiresAt": 1700000000000}