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

User Registration

POST /signup

This endpoint allows you to register an authenticated user in our local database. The user's details should be provided in the request payload. Upon successful registration, the user will be added to the local database, allowing for subsequent interactions with the app.

Headers

Name
Value

Content-Type

application/json

Body

Name
Type
Description

uid

String

Unique identifier for the user

email

String

Email address of the user

displayName

String

Display name of the user

emailVerified

Boolean

Indicates if the email is verified

createdAt

DateTime

Account creation date and time (ISO 8601)

lastLoginAt

DateTime

Last login date and time (ISO 8601)

providerData

Array

Array of provider data objects

├─ providerId

String

Identifier for the authentication provider

└─ providerName

String

Name of the authentication provider

providerUsername

String

Username provided by the authentication provider

Sample Request

curl -X POST https://server-ip:port/signup \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {token}" \
-d '{
  "uid": "12345",
  "email": "testaccount@gmail.com",
  "displayName": "Sample User",
  "emailVerified": true,
  "createdAt": "2024-06-19T12:34:56Z",
  "lastLoginAt": "2024-06-19T12:34:56Z",
  "providerData": [
    {
      "providerId": "google.com",
      "providerName": "Google"
    }
  ],
  "providerUsername": "testaccount"
}'

Response

{
  "uid": "12345",
}
{
  "error creating user"
}

By following the above guidelines, you can seamlessly register users in the local database and proceed with further interactions within the app.

PreviousLogging inNextParsing codebase

Last updated 11 months ago

Was this helpful?