multiRole
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.
GET
/api/auth/oauth/signup/{role}/{provider}/{projectId}Authentication
Public — No Auth Required
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
role | string | Yes | Path segment must match the role's `signupEndpoint` (default `customer`; use each role's configured endpoint). |
provider | string | Yes | OAuth provider (e.g. google, github). |
projectId | string | Yes | Project ID. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
redirect_url | string | No | The URL to redirect to after authentication |
SDK setup
Create a client instance. No authentication is required for this endpoint.
import { MudbaseClient } from "mudbase";
const client = new MudbaseClient();import { MudbaseClient } from "mudbase";
const client = new MudbaseClient();Example request
Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.
const result = await client.auth.oauthSignupWithRole({
role: "hard drive compress",
provider: "program index",
projectId: "proj_Y6mXsIwm2hNu"
});const result = await client.auth.oauthSignupWithRole({
role: "hard drive compress",
provider: "program index",
projectId: "proj_Y6mXsIwm2hNu"
});Try It 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
Responses
200Success (OAuth signup flow initiated; in most cases the server responds with 302 redirect).
json
{
"redirectUrl": "https://youthful-conservative.net/"
}{
"redirectUrl": "https://youthful-conservative.net/"
}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"
}401Authentication required or invalid token.
403Access denied or insufficient permissions.
404Project not found (exact backend message).
500Internal server error.
Errors
| Code | Meaning |
|---|---|
400 | OAuth provider not configured, role not found, or validation error |
401 | Authentication required or invalid token. |
403 | Access denied or insufficient permissions. |
404 | Project not found (exact backend message). |
500 | Internal server error. |