Authentication

Initiate OAuth authentication

Initiates OAuth authentication flow for a specified provider and project. The OAuth provider must be configured and enabled for the project first. Returns an HTTP 302 redirect to the OAuth provider's consent screen. Note: Swagger "Try it out" may show "Failed to fetch" for this endpoint due to browser CORS restrictions on cross-origin redirects. Use top-level browser navigation or curl to test.

AuthPublic
GroupAuthentication
Rate limitSee Rate Limits
GET/api/auth/oauth/{provider}/{projectId}

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.initiateOAuth("pixel hack", "proj_vPOuCmDWKb12");
const { data: result } = await authentication.initiateOAuth("pixel hack", "proj_vPOuCmDWKb12");

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
projectIdstringYes

Query Parameters

NameTypeRequiredDescription
redirect_urlstringNoThe URL to redirect to after authentication. Must be pre-registered in project settings.

Responses

302Redirect to OAuth provider's consent screen
400OAuth provider not configured, not enabled, or missing required server/provider credentials
json
{
  "error": "google authentication not enabled for this project"
}
{
  "error": "google authentication not enabled for this project"
}
404Project not found
json
{
  "error": "Project not found"
}
{
  "error": "Project not found"
}
500

Errors

CodeMeaning
400OAuth provider not configured, not enabled, or missing required server/provider credentials
404Project not found
500
Edit this page on GitHub