Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Latest commit

 

History

History
46 lines (29 loc) · 1.07 KB

google-callback.md

File metadata and controls

46 lines (29 loc) · 1.07 KB

GET /api/auth/google-callback

Description

This endpoint is used as a callback URL for Google OAuth2.0 authentication. It is called by Google after the user has successfully authenticated with Google.

Request

Parameters

See Google OAuth2.0 documentation for more information.

  • code: The authorization code returned by Google after the user has successfully authenticated with Google.
  • error: The error code returned by Google if the user failed to authenticate with Google.

Body

None

Headers

None

Response

{
  "success": true,
  "message": "Login successful"
}

Response Codes

Example:

Code Description
200 Success
201 Created
400 Bad Request
500 Internal Server Error.

Cookies

  • token (optional): The JWT token that is used to authenticate the user. This cookie is only set if the user successfully authenticated with Google.