POST
/
auth
/
oauth2
/
init
curl --request POST \
--url https://{deploymentHost}/auth/oauth2/init \
--header 'Content-Type: application/json' \
--data '{
"provider": "google"
}'
{
"status": 200,
"message": "",
"data": {
"authorization_url": "https://accounts.google.com/oauth/authorize?client_id=example&redirect_uri=https%3A%2F%2Fyour-deployment.wacht.dev%2Fauth%2Foauth2%2Fcallback&response_type=code&scope=openid+email+profile&state=oauth_state_token_123",
"state": "oauth_state_token_123"
},
"session": {
"signin_attempts": [],
"signins": [],
"signup_attempts": [],
"active_signin": null
},
"errors": []
}

Authorizations

__session
string
cookie
required

Session cookie authentication for production deployments. The session token is automatically set as an HTTP-only, secure cookie.

Body

application/json

Response

200
application/json

OAuth2 authorization URL generated

The response is of type object.