Skip to content

Google Signup API

This API provides functionality for users to log in via Google OAuth.


Endpoints Overview

Google Authentication

Method Endpoint Description
GET /auth/google/login/ Redirects users to Google login.
GET /auth/google/callback/ Handles Google OAuth callback.

1. Google Login

Endpoint

  • URL: /auth/google/login/
  • Method: GET
  • Permission Required: AllowAny

Description

Redirects users to Google's OAuth login page where they can authenticate their Google account.

Request Payload

This endpoint does not require a payload.


2. Google OAuth Callback

Endpoint

  • URL: /auth/google/callback/
  • Method: GET
  • Permission Required: AllowAny

Description

Handles Google's OAuth callback after successful authentication. The endpoint verifies the OAuth token, retrieves user details, and logs the user into the application.

Query Parameters

  • code - OAuth authorization code provided by Google.

Response Examples

Success

{
    "access_token": "eyJhbGciTQIiwidXNlcl9pZCI6MjR9._5jQArLg34O_Xam5QMncqrkeFD7sLw",
    "refresh_token": "eyJhbGciOidGkiOiIxMjdiMWU4MWUxYzVzZXJfaWQiOjI0fQ.UbBWDvest9CEsLaZ6vp",
    "email": "doe.john@gmail.com",
    "first_name": "john",
    "last_name": "doe",
    "created": false
}


Error

{
    "error": "Google SocialApp configuration is missing"
}
{
    "error": "Invalid Token"
}