Authentication
Initiate OAuth authentication for organization
Initiates OAuth authentication flow for organization-level signup/login. The OAuth provider must be configured via environment variables (e.g., GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET). After successful authentication, creates a new organization and user account, or logs in existing user.
GET
/api/auth/oauth-org/{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.initiateOrgOAuth("application bypass");const { data: result } = await authentication.initiateOrgOAuth("application bypass");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 |
|---|---|---|---|
redirect_url | string | No | The URL to redirect to after authentication |
Responses
302Redirect to OAuth provider's consent screen
400OAuth provider not configured or not supported
notConfigured
json
{
"error": "google OAuth is not configured",
"message": "Missing environment variables: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET"
}{
"error": "google OAuth is not configured",
"message": "Missing environment variables: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET"
}notSupported
json
{
"error": "OAuth provider 'invalid' is not supported"
}{
"error": "OAuth provider 'invalid' is not supported"
}500—
Errors
| Code | Meaning |
|---|---|
400 | OAuth provider not configured or not supported |
500 | — |