Authentication
OAuth callback handler for organization
Handles OAuth callback for organization-based authentication. Creates a new organization and user account if the user doesn't exist, or logs in existing user. Redirects to frontend with query params token, refreshToken, and expiresIn.
GET
/api/auth/oauth-org/callback/{provider}SDK setup
Create a client instance. No authentication is required for this endpoint.
import { Configuration, AuthenticationApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
});
const authentication = new AuthenticationApi(configuration);import { Configuration, AuthenticationApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
});
const authentication = new AuthenticationApi(configuration);Example request
Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.
const { data: result } = await authentication.orgOAuthCallback("bus reboot");const { data: result } = await authentication.orgOAuthCallback("bus reboot");Playground
liveTest this endpoint with your own credentials. Your requests will be sent to the live API.
No Request Yet
Send a request to see the full inspector
Authentication
Public — No Auth Required
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
provider | string | Yes | — |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
code | string | No | Authorization code from OAuth provider |
state | string | No | State parameter for CSRF protection |
Responses
302Redirect with authentication result
400OAuth authentication failed
json
{
"error": "Email not provided by OAuth provider"
}{
"error": "Email not provided by OAuth provider"
}500—
Errors
| Code | Meaning |
|---|---|
400 | OAuth authentication failed |
500 | — |