> ## Documentation Index
> Fetch the complete documentation index at: https://vectorly-783efd43.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Login with Auth0.

> This API should be called after the user finishes the Auth0 authorization.
So the frontend should be able to obtain an Auth0 token at that point. The
API should be called with this token in the `Authorization` header, in the
format like `Authorization: Bearer <token>`.

The API will call an Auth0 API to query user information with the token. If
it successfully gets it, it means the token is valid. Then the API will
either:

1. Retrieve the user object within our system
2. Create a new user within our system

depending on whether a user with the same identity exists in our system.

If everything is okay, the API will return a token which can then be used
as an identification to call other APIs. The return format is intentionally
designed to keep the same as password login API.



## OpenAPI

````yaml post /base/auth0-login
openapi: 3.1.0
info:
  title: Coinfer Server API
  version: 0.0.1776236533+0db4b8c
  description: |+

    This part of document describes the HTTP APIs of the Coinfer cloud.

servers:
  - url: https://api.coinfer.ai
    description: The production environment
  - url: https://dev.coinfer.ai
    description: The development environment
security: []
tags:
  - name: Object
    description: APIs related to object CRUD operations.
  - name: Invoke
    description: APIs used to invoke CloudFunction or run workflow.
  - name: Notification
    description: APIs related to notification.
  - name: Authorization
    description: >-
      APIs related to user, token, login, etc.


      Normally APIs in this group should not be used. You should get API token
      from our website and then use the token to call other APIs.
paths:
  /base/auth0-login:
    post:
      tags:
        - Authorization
      summary: Login with Auth0.
      description: >-
        This API should be called after the user finishes the Auth0
        authorization.

        So the frontend should be able to obtain an Auth0 token at that point.
        The

        API should be called with this token in the `Authorization` header, in
        the

        format like `Authorization: Bearer <token>`.


        The API will call an Auth0 API to query user information with the token.
        If

        it successfully gets it, it means the token is valid. Then the API will

        either:


        1. Retrieve the user object within our system

        2. Create a new user within our system


        depending on whether a user with the same identity exists in our system.


        If everything is okay, the API will return a token which can then be
        used

        as an identification to call other APIs. The return format is
        intentionally

        designed to keep the same as password login API.
      operationId: coinfer_apis_base_api_auth0_login
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccRsp_Auth0LoginRsp_'
components:
  schemas:
    SuccRsp_Auth0LoginRsp_:
      properties:
        status:
          const: ok
          title: Status
          type: string
        data:
          $ref: '#/components/schemas/Auth0LoginRsp'
      required:
        - status
        - data
      title: SuccRsp[Auth0LoginRsp]
      type: object
    Auth0LoginRsp:
      properties:
        tokens:
          items:
            type: string
          title: Tokens
          type: array
      required:
        - tokens
      title: Auth0LoginRsp
      type: object

````