Google Auth
GET
/v1/auth/googleThe Google Auth endpoint initiates the Google OAuth 2.0 flow by returning a URL for the Google Consent Screen. Users are redirected to this URL to grant permissions. After consent, an authorization code is generated, and the user is redirected to the server callback. The server then exchanges this code for access and refresh tokens and redirects the user back to the client with these tokens included in the query parameters.
Request
None
Request samples
Responses
OK(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
status
integer
required
message
string
required
data
object
required
url
string
required
Example
{
"status": 200,
"message": "Google auth url generated successfully.",
"data": {
"url": "https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&response_type=code&client_id=1084293772296-fdthn73jeu8vohll7hborm44midn9947.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fv1%2Fauth%2Fgoogle%2Fcallback"
}
}
Last modified: 4 months ago