-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] Create Endpoint to Store Session or User Cookies #197
Comments
seems weird to store session cookies in an endpoint ither than login |
amendment made |
"Successfully store and apply user session details across the different parts of the application." Could you be a little more detailed? |
Okay |
@highb33kay done. |
@highb33kay please check this, |
Like Mark mentioned why isnt this part of the login fuctionality? Also this could be seesions management endpoint to Logout of logged in devices? |
[FEAT] Integrate Session Management into Login Endpoint #197
Description
Implement backend functionality to support storing session or user cookies within the login endpoint, ensuring they are securely stored and applied correctly across the application.
Acceptance Criteria
Database Schema Update
API Endpoints Implementation
Session Management
Security and Performance
Documentation
Purpose
Provide backend infrastructure to store and manage user session details, enabling a secure user experience.
Requirements
Expected Outcome
Successfully store and apply user session details across the application, enabling personalized experiences, persistent login, and with accurate recall of user preferences, settings, and previous interactions.
Endpoints
Login and Store User Session
Description: Handle user login and store session details for a user.
POST /api/v1/auth/login
Content-Type: application/json
Request Body:
Response (Success):
On successful login, the API should return a 200 OK status code. The response body should contain a success message:
Response (Error):
If there is an error logging the user in due to invalid login credentials, the API should return a 401 Unauthorized status code with an appropriate message:
If there is an error logging the user in (e.g., server down, network issues), the API should return a 500 Internal Server Error status code with an appropriate message:
Get User Session
Description: Get the current session details for a user.
GET /api/v1/session
Response (Success):
On success, the API should return a 200 OK status code. The response body should contain a success message:
Response (Error):
When the user does not have the necessary authorization to perform the requested action, the API should return a 401 Unauthorized status code with an appropriate message:
When the session ID is not found or has expired, the API should return a 401 Unauthorized status code with an appropriate message:
If there is an internal server error, the API should return a 500 Internal Server Error status code with an appropriate message:
Task Checklist
Testing
The text was updated successfully, but these errors were encountered: