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.

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

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
codestringNoAuthorization code from OAuth provider
statestringNoState 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

CodeMeaning
400OAuth authentication failed
500
Edit this page on GitHub