Skip to content
v3.0.1 — MCP OAuth, organizations, passkeys, SSR adaptersChangelog
Convex Auth
Esc
↑↓navigate↵open⌘Jpreview

Begin an OAuth sign-in and return the provider authorization URL

Returns a signed provider authorization URL instead of redirecting directly, so clients choose between following it (browser) or opening it in a web session (React Native). Every redirect-bearing field is validated against trustedOrigins; custom schemes (e.g. myapp://, exp://) are allowed only when configured.

POST/api/auth/sign-in/social
Request body
requiredapplication/json
providerstringrequired
callbackURLstring

App URL to land on after the provider round-trip.

errorURLstring
newUserURLstring
requestSignUpboolean
linkboolean

Link this provider account to the signed-in user.

landingVerifierstring

Cookie-bound landing verifier for token-mode flows. The SSR boundary substitutes the cookie value; never trust a body-supplied value when the cookie exists.

Responses
200

Signed provider URL to navigate to.

successboolean
Allowed:true
urlstring<uri>
redirectboolean
400

Unknown provider or an untrusted redirect parameter (invalid_callback_url, invalid_error_url, invalid_new_user_url).

successbooleanrequired
Allowed:false
reasonstringrequired
Try it
Server
Bodyapplication/json
Request
curl -X POST 'https://your-deployment.convex.site/api/auth/sign-in/social' \
  -H 'Content-Type: application/json' \
  -d '{
  "provider": "google",
  "callbackURL": "string",
  "errorURL": "string",
  "newUserURL": "string",
  "requestSignUp": true,
  "link": true,
  "landingVerifier": "string"
}'
Response
{
  "success": true,
  "url": "http://example.com",
  "redirect": true
}