Login

Login to get an authentication token.

Return an access token in the response and a cookie storing a refresh token.

Args: form_data (Annotated[OAuth2PasswordRequestForm, Depends()]): The form data to authenticate the user. session (Annotated[Session, Depends(get_db)]): The database session. cookie_max_age (int): the lifetime of the cookie storing the refresh token.

post/login

Query parameters

cookie_max_ageinteger

Response

Successful Response

access_tokenstring required
refresh_tokenstring required
token_typestring required

Changes

Changed in 2 of the 2 revisions of this API.84

  • c24fa4e2338033See the full diff
    • the client_secret request property type/format changed from / to /password

      request-property-type-changed

    • the password request property type/format changed from string/ to string/password

      request-property-type-changed

    • the response's body type/format changed from / to object/ for status 200

      response-body-type-changed

    • added the required property access_token to the response with the 200 status

      response-required-property-added

    • added the required property refresh_token to the response with the 200 status

      response-required-property-added

    • added the required property token_type to the response with the 200 status

      response-required-property-added

    This revision also has 14 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • bbcc40488a7251See the full diff
    • the client_secret request property type/format changed from /password to /

      request-property-type-changed

    • the response's body type/format changed from object/ to / for status 200

      response-body-type-changed

    • removed the required property access_token from the response with the 200 status

      response-required-property-removed

    • removed the required property refresh_token from the response with the 200 status

      response-required-property-removed

    • removed the required property token_type from the response with the 200 status

      response-required-property-removed

    • the password request property type/format was generalized from string/password to string/

      request-property-type-generalized

    This revision also has 103 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog