Google OAuth
Last updated
Last updated
Generates a state parameter and authentication URL for initiating Google OAuth authentication flow.
Request
No request body or query and path parameters are required.
Response
The response contains the following structure:
status: Indicates if the request was successful
message: A brief status message
data: Contains the OAuth information with the following properties:
state: A randomly generated string that serves as the state parameter for the OAuth flow
googleAuthUrl: The complete Google authentication URL that includes all necessary parameters
Google Authentication URL Details
The generated googleAuthUrl includes several OAuth parameters:
scope: Defines the permissions requested from Google, including:
response_type: Set to "code" to receive an authorization code
access_type: Set to "offline" to receive a refresh token for obtaining new access tokens
state: The random state string generated for this authentication attempt
redirect_uri: The URL where Google will redirect after authentication (your_front_end_url_here)
client_id: The application's Google client ID
The state parameter serves as a security measure to prevent CSRF attacks by validating that the authentication response comes from the same session that initiated the request.
OK