Skip to main content
GET
Sign in with Google (OAuth code)
Exchange Google OAuth authorization code for user profile and issue a session token. If the user does not exist, a new user is created.

Request

Path Parameters

Response

200 OK - Successful sign-in

Returns user and token.

400 Bad Request

500 Internal Server Error

Example

Notes

  • The authorization code must be obtained from Google’s OAuth 2.0 flow
  • If the user doesn’t exist in the system, a new user account will be created
  • The returned token should be stored securely and used for subsequent authenticated requests
  • Token expiration time is typically 24 hours

OAuth Flow

  1. Redirect user to Google’s OAuth consent screen
  2. User authorizes the application
  3. Google redirects back with authorization code
  4. Exchange the code for access token and user profile using this endpoint

Path Parameters

code
string
required

Authorization code returned by Google's OAuth flow

Response

Successful sign-in, returns user and token

token
string
user
object