Finish signing in with WorkOS
GET
/v1/login/callback
const url = 'https://app.caprid.com/v1/login/callback';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://app.caprid.com/v1/login/callbackWorkOS sends the browser back here. You never call it yourself.
A returning person gets a session cookie. A first sign-in whose verified email matches an existing Account is linked to it, once and for good. Anyone else gets a signup in progress, and the dashboard asks them for a Namespace.
Either way the browser lands on /app/. When signing in didn’t work,
?login= says why: failed, unverified (WorkOS hasn’t verified the
email), or conflict (the email’s Account is linked to a different
WorkOS user).
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”code
string
state
string
Responses
Section titled “Responses”Redirect to the dashboard.
This server doesn’t use WorkOS login.
Media typeapplication/json
object
error
required
string
Example
{ "error": "the requested grants exceed the key's scope"}