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.

AuthPublic
GroupAuthentication
Rate limitSee Rate Limits
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

live

Test 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

NameTypeRequiredDescription
providerstringYes

Query Parameters

NameTypeRequiredDescription
redirect_urlstringNoThe 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

CodeMeaning
400OAuth provider not configured or not supported
500
Edit this page on GitHub