Verify Endpoint

Verifies the token, and sends an updated JWT token if the encrypting token has been udapted

Untitled

(1) Check that there is a tokenId in the body of the request

(2) Check that google hhas been enabled

(2) If the user is google authenticated, make a request the google API to get the users email.

(3) Using the user's email find them in the database and return a succes message with the users role and id, or an error message if they aren't in the database.

(3) If the user isn't google authenticated, it verifies their token is valid and corresponds to a user in the database

(4) Check if the token has been refreshed, and if so regenerate a JWT token and return it along with the user's role, autheid, and verification status

(5) Otherwise send a success message just return the user's role, authenticationId, and email verification status

Example Request

{
    url: "<http://localhost:8000/verify>"
    headers: {
        "Content-Type":"application/json",
        "token": "JRRTolkien"
}

Resend Verification Endpoint

Resend the verification email to verify your account with a pin number

Untitled

(1) If gmail is not enabled, it returns an error message

(2) Verify that the token is valid and the user exists in the database. Will return you an error message if the user is already verified

(3) Will generate a pin and send it in an email to the user. Sends a success or error message based on if the email is succesfully sent.

Example Request