Skip to main content
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

Body

application/json
provider
enum<string>
required
Available options:
google,
github,
microsoft
redirect_url
string

Response

status
integer
required
message
string
required
data
any
required
session
object
required
errors
object[]
required