Frontend API
cURL
curl --request POST \ --url https://api.wacht.dev/auth/oauth2/init \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data provider=google \ --data redirect_url=https://app.example.com/auth/callback
{ "oauth_url": "https://accounts.google.com/o/oauth2/v2/auth?..." }
Initialize OAuth2/OIDC authentication with external provider
OAuth2 provider (google, github, etc.)
"google"
URL to redirect to after authentication
"https://app.example.com/auth/callback"
OAuth2 URL generated
"https://accounts.google.com/o/oauth2/v2/auth?..."
Was this page helpful?