blazex
  1. auth
blazex
  • README.md
  • auth
    • Register
      POST
    • Login
      POST
    • Refresh Token
      GET
    • Google Auth
      GET
  1. auth

Google Auth

GET
/v1/auth/google
The 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 Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/v1/auth/google'
Response Response Example
200 - Success
{
    "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"
    }
}

Request

None

Responses

🟢200OK
application/json
Body
status
integer 
required
message
string 
required
data
object 
required
url
string 
required
🔴500InternalServerError
Modified at 2024-11-09 13:49:40
Previous
Refresh Token
Built with