An identity provider I made that uses refresh/access token system.
The identity provider utilizes JSON Web Tokens (JWT) for authentication and implements a refresh/access token system for secure user authentication. To enhance security, the system employs refresh token rotation, which periodically rotates refresh tokens to mitigate the risk of token misuse or compromise. Additionally, breach detection mechanisms are in place to monitor and identify suspicious activities, such as refresh token reuse. These features collectively ensure robust authentication and protection against unauthorized access.
- URL:
/user
- Method: POST
- Description: This endpoint allows users to create a new account. This action requires email verification.
- URL:
/user
- Method: GET
- Description: This endpoint retrieves a list of all users.
- URL:
/user/unique/email/:email
- Method: GET
- Description: This endpoint checks if the provided email is unique.
- URL:
/user/unique/username/:username
- Method: GET
- Description: This endpoint checks if the provided username is unique.
- URL:
/user/updateEmail
- Method: PUT
- Description: This endpoint allows users to update their email address. This action requires email verification.
- URL:
/user/updatePassword
- Method: PUT
- Description: This endpoint allows users to update their password.
- URL:
/user/updateUsername
- Method: PUT
- Description: This endpoint allows users to update their username. This action does require email verification.
- URL:
/user/deleteUser
- Method: DELETE
- Description: This endpoint allows users to delete their account.
- URL:
/user/forgotPassword
- Method: POST
- Description: This endpoint is used for initiating the password reset process.
- URL:
/user/resetPassword
- Method: POST
- Description: This endpoint is used for resetting the user's password.
- URL:
/user/checkResetPasswordToken/:token
- Method: GET
- Description: This endpoint checks the validity of the reset password token.
- URL:
/user/:id
- Method: GET
- Description: This endpoint retrieves user information by ID.
- URL:
/login
- Method: POST
- Description: This endpoint is used for user login.
- URL:
/logout
- Method: POST
- Description: This endpoint is used for user logout.
- URL:
/refresh
- Method: POST
- Description: This endpoint is used to refresh the access token.
- URL:
/isLoggedIn
- Method: GET
- Description: This endpoint checks if the user is logged in.
- URL:
/getRole
- Method: GET
- Description: This endpoint retrieves the role of the user.
- URL:
/sessions/oauth/google
- Method: POST
- Description: This endpoint handles OAuth authentication with Google.
- URL:
/autoLogoutAt
- Method: GET
- Description: This endpoint retrieves the time of auto-logout for the user.
- URL:
/requestCode/loggedInUser
- Method: POST
- Description: This endpoint is used to request an email verification code for the logged-in user.
- URL:
/requestCode/newEmail
- Method: POST
- Description: This endpoint is used to request an email verification code for a new email address.