momentum.sh
  • 💡Introduction to Momentum
    • Overview
    • How can momentum help you?
    • Why is it open source
    • Contributing to momentum
    • Troubleshooting & Feedback
  • Getting Started
    • Hers's what you will need
    • Installation
      • Cloud Integrations (Optional)
        • Portkey
        • Firebase
        • Setting up Github App
        • Enabling Github Auth on Firebase
        • Google Cloud
    • Running Momentum
    • Known bugs & fixes
  • Using Momentum
    • Underlying API structure
    • Auth
    • Logging in
    • User Registration
    • Parsing codebase
    • Getting list of all parsed projects
    • Getting list of all branches in a project
    • Listing all endpoints of a branch
    • Understanding Changes & Impacts
    • Generating Blast Radius
    • Get Flow Graph
    • Get Dependencies
    • Get More Dependencies (AI)
    • Getting code of a specific node
    • Testing your code
    • Generating a test plan
    • Setting up the test plan
    • Preferences
      • Setting preferences of a specific endpoint
      • Getting preferences for specific endpoint
    • Generating tests
  • Using Momentum CLI
Powered by GitBook
On this page

Was this helpful?

  1. Using Momentum

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

Name
Value

Content-Type

application/json

Body

Name
Type
Description

email

string

Email of the user

password

string

Password of the user

Response

{
  "token":"bearertoken"
}
{
    "error": "ERROR: {'error': {'code': 400, 'message': 'INVALID_LOGIN_CREDENTIALS', 'errors': [{'message': 'INVALID_LOGIN_CREDENTIALS', 'domain': 'global', 'reason': 'invalid'}]}}"
}

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.

PreviousAuthNextUser Registration

Last updated 10 months ago

Was this helpful?