This project provides a set of APIs to manage user authentication and registration and verification. It supports user management functionalities such as registration and login.
Base URL: https://techyjaunt-project.onrender.com
- Method:
POST - Endpoint:
{server}/register - Purpose: Allows new users to register their details in the database.
- Request Body Example:
{ "name": "John", "email": "johndoe@example.com", "password": "securepassword" }
- Method:
POST - Endpoint:
{server}/login - Purpose: Allows existing users to log in using their email address and password.
- Request Body Example:
{ "email": "johndoe@example.com", "password": "sample" }
- Method:
GET - Endpoint:
{server}/user - Purpose: Fetches the data of the logged in user.
- Note: Make sure to include token in your headers when sending request. This token expires after 1h.
- Request Body Example:
headers: { 'Authorization': `Bearer ${token}` }
The user object returned by the API contains the following fields:
- _id - Unique identifier for the user.
- name - The user's name.
- email - The user's email address.
Note: Ignore user _id as this will be given to the user once registered on the database.