Liftli Authentication API

The authentication API from Liftli — 6 operation(s) for authentication.

GitHub OpenAPI

Operations 6

POST /auth/google/verify Verify Google Token #
GET /auth/me Get Current User Info #
POST /auth/logout Logout #
POST /auth/google/callback Handle Google Callback #
POST /auth/refresh Refresh Token #
POST /api/v1/auth/workos/session Handle Workos Session #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/liftli-ai:liftli-ai-authentication-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

liftli-ai-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Liftli Ai Authentication API
  version: 1.4.6
  description: 'Operations tagged authentication across 2 of this provider''s published API definitions: app.liftli.ai.json, app-liftli-ai-openapi.json. Each path carries the servers of the definition it was published in.'
tags:
- name: Authentication
paths:
  /auth/google/verify:
    post:
      tags:
      - Authentication
      summary: Verify Google Token
      description: 'Verify Google OAuth token and return Liftli access token.


        This endpoint:

        1. Verifies the Google token with Google''s servers

        2. Gets or creates user in our database

        3. Generates a Liftli JWT token

        4. Returns user info and access token


        Gated on token_crypto BEFORE any work (C2): step 2 writes the refresh token through

        `store_google_refresh_token`, which encrypts and fails closed. With no usable key that raised

        inside the catch-all below and came back as a 500 "Authentication failed" - an operator

        configuration problem dressed up as a broken login, with a Google round trip and a user row

        written first. 503 says what it is: this instance cannot store credentials right now.'
      operationId: verify_google_token_auth_google_verify_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleTokenRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /auth/me:
    get:
      tags:
      - Authentication
      summary: Get Current User Info
      description: 'Get current user information.


        Requires valid JWT token in Authorization header.'
      operationId: get_current_user_info_auth_me_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/liftli__api__auth__UserResponse'
  /auth/logout:
    post:
      tags:
      - Authentication
      summary: Logout
      description: 'Logout current user.


        Revokes this ONE session''s stored, provider-held refresh credential so a bearer token

        captured before this call can no longer renew itself through POST /auth/refresh: the

        WorkOS `workos_sessions` row matching this JWT''s `workos_sid` claim (see

        workos_session.py), and/or the Google `google_refresh_token` on the user row - whichever

        the login path actually populated. Previously this endpoint did nothing server-side for

        WorkOS at all (adversarial review, 2026-09-06 round 3), and that same fix''s docstring

        explicitly left the Google path unrevoked, calling it "out of scope, tracked as a

        follow-up" - but it is the exact same vulnerability class (a captured bearer token stays

        renewable indefinitely after "logging out"), just on the other login path, so it belongs

        here rather than deferred (2026-09-07 review).


        Decorated with `require_auth_allow_expired`, not the strict `require_auth` (2026-09-07

        review): a bearer token that expired moments ago is still the user''s own proof of

        identity for the one thing this endpoint does - deleting/clearing ITS OWN stored

        credential - and the strict decorator would 401 before the handler ever ran, silently

        leaving that credential live and renewable forever. Mirrors POST /auth/refresh''s own

        reasoning for accepting a JWT of any age; unlike that endpoint, this one mints nothing, so

        there is no live-revocation check being skipped.


        Does NOT end the WorkOS-side SSO session (the browser cookie behind AuthKit''s silent

        auto-forward) - that is `LIFTLI_WORKOS_LOGOUT` + `workos_auth.logout_url`, a separate,

        off-by-default, product-level decision (see console/src/services/auth.ts''s own logout,

        which redirects through that URL when the login response provided one).'
      operationId: logout_auth_logout_post
      parameters:
      - name: authorization
        in: header
        required: true
        schema:
          type: string
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
                title: Response Logout Auth Logout Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /auth/google/callback:
    post:
      tags:
      - Authentication
      summary: Handle Google Callback
      description: 'Handle Google OAuth callback.


        This endpoint:

        1. Exchanges authorization code for tokens with Google

        2. Gets user info from Google

        3. Creates/updates user in database

        4. Returns Liftli JWT token


        Gated on token_crypto BEFORE any work, mirroring POST /auth/google/verify: step 3 writes

        the refresh token through `store_google_refresh_token`, which encrypts and fails closed.

        With no usable key that would raise inside the catch-all below and come back as a 500

        "Authentication failed" - an operator configuration problem dressed up as a broken login,

        with a Google round trip and a user row written first. 503 says what it is: this instance

        cannot store credentials right now.'
      operationId: handle_google_callback_auth_google_callback_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleCallbackRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /auth/refresh:
    post:
      tags:
      - Authentication
      summary: Refresh Token
      description: 'Refresh the Liftli JWT before it expires.


        This endpoint''s decorator (`require_auth_allow_expired`) accepts a JWT of ANY age - it never

        checks `exp`. That is safe ONLY because minting a new JWT here always re-validates against a

        live, revocable, provider-held credential first: `google_refresh_token` for the Google login

        path, or - for WorkOS/AuthKit - the ONE `workos_sessions` row matching this JWT''s own

        `workos_sid` claim. A branch that skipped that check and trusted only a local `is_active`

        flag would turn ANY captured bearer token - stolen, logged, leaked - into an indefinitely

        renewable credential with no way to detect a sign-out or revoked session at the identity

        provider. (A bare `google_refresh_token`-missing check is also unsafe as a WorkOS-vs-Google

        discriminator: `/auth/google/verify`, the Chrome extension''s login route, creates Google

        users via `get_or_create_user` with no refresh token either - this is why the elif below

        requires BOTH `current_user.workos_subject` and an actual `workos_sid` claim on THIS token,

        not just "no Google token".)


        Session scoping (2026-09-06, round 2 of review): the WorkOS branch does NOT look up "the"

        refresh token for this user - there is no such single thing. Each WorkOS login is its own

        session with its own refresh-token chain; a user with two concurrent sessions (two tabs, a

        laptop and a phone, or two of this app''s own historical forced-relogin cycles racing) has

        two independent chains. An earlier version of this fix stored one refresh token per USER,

        which let whichever session logged in or refreshed last silently invalidate or hijack every

        other session''s renewal - caught in adversarial review before merge. The JWT itself now

        carries `workos_sid` (set at login, in `handle_workos_session`), and this endpoint looks up

        `workos_sessions` by that exact sid, so one session''s refresh can only ever touch its own

        credential.


        Transient-failure handling (same review, second finding): `workos_auth.refresh_session`

        already retries a genuine WorkOS blip (timeout, 429, 5xx) a couple of times before giving up;

        if it STILL can''t get through, that is reported as `WorkOSTransientError`, which this

        endpoint answers with 503 (not 401) - the console is expected to leave the current JWT alone

        and try again shortly, not treat "WorkOS was briefly unreachable" as "this session is

        revoked." Only a genuinely terminal WorkOS response (a real `invalid_grant`, a revoked

        session) raises the plain `WorkOSAuthError` that becomes a real 401.


        History: this endpoint originally supported the Google path only, and unconditionally 400''d

        every WorkOS user''s scheduled refresh, since nothing analogous to `google_refresh_token` was

        ever captured for WorkOS logins. `console/src/services/auth.ts` schedules a refresh 5 minutes

        before the 60-minute JWT expires; confirmed in production, EVERY refresh for a WorkOS session

        failed this way, forcing a full logout + AuthKit re-authentication roughly once per hour -

        invisible when AuthKit''s own SSO cookie was still live (a ~2-20s silent round trip), but the

        proximate cause of at least one user-visible "Authentication Failed" screen, and directly

        reproducing on the product owner''s own account. See the 2026-09-06 investigation report and

        its two review addenda for the full history (an auth-bypass fix, then this session-scoping +

        resilience fix).


        Existing WorkOS users signed in before session-scoped storage existed have no

        `workos_sessions` row and no `workos_sid` claim on their current JWT; their next scheduled

        refresh below correctly falls to the final `else` and requires one more forced re-login

        through AuthKit (which stores both), after which refreshes work normally. Self-healing, no

        backfill needed.'
      operationId: refresh_token_auth_refresh_post
      parameters:
      - name: authorization
        in: header
        required: true
        schema:
          type: string
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/workos/session:
    post:
      tags:
      - Authentication
      summary: Handle Workos Session
      description: 'Exchange a WorkOS authorization code for a Liftli session (spec section 18.4).


        1. Exchange the code via the WorkOS User Management authenticate call (confidential client).

        The returned ``user`` is authoritative (server-to-server, API-key-authenticated, over TLS)

        - there is no client-supplied token to verify.

        2. Reconcile by ``workos_subject`` (subject-first, fresh-on-miss, NO email match - N1/N3).

        3. Issue the SAME ``liftli_token`` and return the SAME shape as the Google callback.'
      operationId: handle_workos_session_api_v1_auth_workos_session_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkOSSessionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    liftli__api__auth__UserResponse:
      properties:
        user:
          additionalProperties: true
          type: object
          title: User
      type: object
      required:
      - user
      title: UserResponse
      description: Response model for user info.
    GoogleCallbackRequest:
      properties:
        code:
          type: string
          title: Code
        redirect_uri:
          type: string
          title: Redirect Uri
        client_type:
          type: string
          title: Client Type
          default: web_console
        timezone:
          anyOf:
          - type: string
          - type: 'null'
          title: Timezone
      type: object
      required:
      - code
      - redirect_uri
      title: GoogleCallbackRequest
      description: Request model for Google OAuth callback.
    GoogleTokenRequest:
      properties:
        google_token:
          type: string
          title: Google Token
        client_type:
          type: string
          title: Client Type
          default: chrome_extension
        timezone:
          anyOf:
          - type: string
          - type: 'null'
          title: Timezone
      type: object
      required:
      - google_token
      title: GoogleTokenRequest
      description: Request model for Google token verification.
    SignupAttributionInput:
      properties:
        lp:
          anyOf:
          - type: string
          - type: 'null'
          title: Lp
        role:
          anyOf:
          - type: string
          - type: 'null'
          title: Role
        role_other:
          anyOf:
          - type: string
          - type: 'null'
          title: Role Other
        goal:
          anyOf:
          - type: string
          - type: 'null'
          title: Goal
        goal_other:
          anyOf:
          - type: string
          - type: 'null'
          title: Goal Other
        utm_source:
          anyOf:
          - type: string
          - type: 'null'
          title: Utm Source
        utm_medium:
          anyOf:
          - type: string
          - type: 'null'
          title: Utm Medium
        utm_campaign:
          anyOf:
          - type: string
          - type: 'null'
          title: Utm Campaign
        utm_content:
          anyOf:
          - type: string
          - type: 'null'
          title: Utm Content
        utm_term:
          anyOf:
          - type: string
          - type: 'null'
          title: Utm Term
        gclid:
          anyOf:
          - type: string
          - type: 'null'
          title: Gclid
        gbraid:
          anyOf:
          - type: string
          - type: 'null'
          title: Gbraid
        wbraid:
          anyOf:
          - type: string
          - type: 'null'
          title: Wbraid
      type: object
      title: SignupAttributionInput
      description: 'Client-supplied signup attribution. Validation NEVER raises: a bad field becomes None.'
    AuthResponse:
      properties:
        access_token:
          type: string
          title: Access Token
        token_type:
          type: string
          title: Token Type
        user:
          additionalProperties: true
          type: object
          title: User
        expires_in:
          type: integer
          title: Expires In
        workos_logout_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Workos Logout Url
        new_user:
          type: boolean
          title: New User
          default: false
      type: object
      required:
      - access_token
      - token_type
      - user
      - expires_in
      title: AuthResponse
      description: Response model for authentication.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WorkOSSessionRequest:
      properties:
        code:
          type: string
          title: Code
        redirect_uri:
          type: string
          title: Redirect Uri
        client_type:
          type: string
          title: Client Type
          default: web_console
        timezone:
          anyOf:
          - type: string
          - type: 'null'
          title: Timezone
        code_verifier:
          anyOf:
          - type: string
            maxLength: 128
            minLength: 43
            pattern: ^[A-Za-z0-9._~-]+$
          - type: 'null'
          title: Code Verifier
        attribution:
          anyOf:
          - $ref: '#/components/schemas/SignupAttributionInput'
          - type: 'null'
      type: object
      required:
      - code
      - redirect_uri
      title: WorkOSSessionRequest
      description: Request model for the WorkOS AuthKit code-exchange + session endpoint.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
x-refined-from:
- app.liftli.ai.json
- app-liftli-ai-openapi.json
x-provenance:
  method: harvested
  publisher: Liftli
  source: https://app.liftli.ai/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)