Logging in

POST /login

This endpoint allows users to log in to the app using their email and password. The user must first be created in Firebase Authentication. Upon successful login, a token is returned, which is necessary for authentication in subsequent requests.

Steps to Create User in Firebase Authentication

  1. Go to your Firebase project.

  2. Navigate to Authentication.

  3. Click on "Add User".

  4. Provide the email and password.

  5. Add the user.

Headers

NameValue

Content-Type

application/json

Body

NameTypeDescription

email

string

Email of the user

password

string

Password of the user

Response

{
  "token":"bearertoken"
}

Notes

  • Ensure that the email and password provided are correct and match the credentials used in Firebase Authentication.

  • The token returned in the response is necessary for all subsequent requests to the API. Store it securely and include it in the Authorization header as Bearer <token> for authenticated endpoints.

Last updated