Multi-Role Feature

OAuth signup with specific role

Public endpoint that initiates OAuth signup flow with a specific role assigned during registration. The OAuth provider must be configured and enabled for the project first. The role must be available for signup in the project's multi-role configuration. After successful OAuth authentication, the user will be created with the specified role. No authentication required - this is a public signup endpoint.

AuthPublic
GroupMulti-Role Feature
Rate limitSee Rate Limits
GET/api/auth/oauth/signup/{role}/{provider}/{projectId}

SDK setup

Create a client instance. No authentication is required for this endpoint.

import { Configuration, MultiRoleFeatureApi } from 'mudbase-sdk';

const configuration = new Configuration({
  basePath: 'https://cloud.mudbase.dev',
});

const multirolefeature = new MultiRoleFeatureApi(configuration);
import { Configuration, MultiRoleFeatureApi } from 'mudbase-sdk';

const configuration = new Configuration({
  basePath: 'https://cloud.mudbase.dev',
});

const multirolefeature = new MultiRoleFeatureApi(configuration);

Example request

Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.

const { data: result } = await multirolefeature.oauthSignupWithRole("bandwidth parse", "driver index", "proj_2Wvvb7dE6S2e");
const { data: result } = await multirolefeature.oauthSignupWithRole("bandwidth parse", "driver index", "proj_2Wvvb7dE6S2e");

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
rolestringYesPath segment must match the role's `signupEndpoint` (default `customer`; use each role's configured endpoint).
providerstringYes
projectIdstringYes

Query Parameters

NameTypeRequiredDescription
redirect_urlstringNoThe URL to redirect to after authentication

Responses

302Redirects to OAuth provider's consent screen
400OAuth provider not configured, role not found, or validation error

providerNotEnabled

json
{
  "error": "google authentication not enabled for this project",
  "message": "Please configure google OAuth provider in project settings first"
}
{
  "error": "google authentication not enabled for this project",
  "message": "Please configure google OAuth provider in project settings first"
}

roleNotFound

json
{
  "error": "Role not found",
  "message": "Role with endpoint 'seller' is not available for this project"
}
{
  "error": "Role not found",
  "message": "Role with endpoint 'seller' is not available for this project"
}
404Project not found
json
{
  "error": "Project not found"
}
{
  "error": "Project not found"
}
500

Errors

CodeMeaning
400OAuth provider not configured, role not found, or validation error
404Project not found
500
Edit this page on GitHub