# Resolve a federated sign-in provider

Source: https://business-api-docs.youhodler.com/api/reference/auth/oauth-provider

**Authentication:** This endpoint does not require a bearer token.

Returns authorization-code flow endpoints only when the exact issuer and client ID are registered and active. The endpoints are read from the provider OIDC discovery document by identity-service. This public endpoint also exposes the registered workspace legal name as organization_name; it is null when the name lookup fails or times out. `end_session_endpoint` is the provider’s RP-initiated logout from the same discovery document, `null` when it has none (the console then restarts sign-in with `prompt=login&max_age=0`).

## Parameters

| Name | Location | Type | Required | Description and constraints |
| --- | --- | --- | --- | --- |
| `issuer` | query | string | Yes | format: uri |
| `client_id` | query | string | Yes | minLength: 1 |

## Request

**Request URL — GET**
```http
GET /oauth/federated-sign-in/provider
```

## Responses

**200 Operation succeeded**

Operation succeeded.

```json
{
  "authorization_endpoint": "https://idp.partner.example.com/authorize",
  "client_id": "b2b-admin",
  "end_session_endpoint": "https://idp.partner.example.com/logout",
  "issuer": "https://idp.partner.example.com",
  "organization_name": "Example Organization",
  "token_endpoint": "https://idp.partner.example.com/token"
}
```

**400 Invalid request payload**

Invalid request payload, query, or parameter shape.

**502 Upstream service returned an unexpected error**

Upstream service returned an unexpected error.

**503 Service is temporarily unavailable**

Service is temporarily unavailable; retry with backoff.
### Response 200 schema

Content type: `application/json`.

#### application/json body

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| `authorization_endpoint` | string | Yes | format: uri |
| `authorization_response_iss_parameter_supported` | boolean | No |  |
| `client_id` | string | Yes | minLength: 1 |
| `end_session_endpoint` | string or null | No |  |
| `issuer` | string | Yes | format: uri |
| `organization_name` | string or null | No |  |
| `token_endpoint` | string | Yes | format: uri |

Additional fields are not accepted.

##### application/json body.end_session_endpoint

At least one alternative must match.

###### application/json body.end_session_endpoint: alternative 1

Type: `string`. format: uri

###### application/json body.end_session_endpoint: alternative 2

Type: `null`. 

##### application/json body.organization_name

At least one alternative must match.

###### application/json body.organization_name: alternative 1

Type: `string`. minLength: 1

###### application/json body.organization_name: alternative 2

Type: `null`.

### Response 400 schema

Content type: `application/json`.

#### application/json body

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| `code` | string | Yes |  |
| `data` | object | No | No additional fields |
| `details` | object | No | Additional fields allowed |
| `message` | string | Yes |  |

Additional fields are not accepted.

##### application/json body.data

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| `acr_values` | string | No | RFC 9470 step-up challenge (`insufficient_user_authentication`). |
| `blockers` | object[] | No | For `closure_preconditions_not_met` on a terminal lifecycle verb: what must be resolved before the transition. |
| `code` | string | No | For legal refusals: the document code the refusal is about. |
| `max_age` | string | No | RFC 9470 step-up challenge (`insufficient_user_authentication`). |
| `max_source_amount` | object | No | For `amount_below_minimum` / `amount_above_maximum`: the product maximum in source asset units; null means no maximum. No additional fields |
| `min_source_amount` | object | No | For `amount_below_minimum` / `amount_above_maximum`: the effective minimum in source asset units, fees included. No additional fields |
| `published_version` | string | No | For `document_version_superseded`: the version currently published. |
| `reason` | string | No | Typed refinement of `code`, from the failing service's contract. |
| `resource` | string | No | Resource kind a `resource_not_found` refers to. |
| `retry_after_ms` | integer | No | Suggested back-off in milliseconds for throttling or temporary unavailability; null means no delay is known. minimum: 0 |
| `source` | string | No | For `not_admissible`: the gate that denied (verification, lifecycle, policy, compliance). |

Additional fields are not accepted.

###### application/json body.data.blockers

For `closure_preconditions_not_met` on a terminal lifecycle verb: what must be resolved before the transition.

Type: `object[]`. 

###### application/json body.data.blockers item

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| `description` | string | Yes |  |
| `type` | "non_zero_balance" / "active_sub_resources" / "pending_operations" / "active_users" / "active_service_accounts" / "active_role_assignments" | Yes |  |
| `assets` | object[] | No | minItems: 1 |
| `count` | integer | No | minimum: 0; maximum: 9007199254740991 |

Additional fields are not accepted.

###### application/json body.data.blockers item.assets

Type: `object[]`. minItems: 1

###### application/json body.data.blockers item.assets item

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| `asset` | string | Yes | Currency code (ISO-4217 or on-chain ticker) pattern: `^[A-Z0-9]{1,16}$` |
| `kind` | "balance" / "held" / "owed" / "unsettled" | Yes |  |

Additional fields are not accepted.

###### application/json body.data.max_source_amount

For `amount_below_minimum` / `amount_above_maximum`: the product maximum in source asset units; null means no maximum.

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| `currency` | string | Yes |  |
| `value` | string | Yes |  |

Additional fields are not accepted.

###### application/json body.data.min_source_amount

For `amount_below_minimum` / `amount_above_maximum`: the effective minimum in source asset units, fees included.

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| `currency` | string | Yes |  |
| `value` | string | Yes |  |

Additional fields are not accepted.

### Response 502 schema

Content type: `application/json`.

See [response 400 schema](#response-400-schema).

### Response 503 schema

Content type: `application/json`.

See [response 400 schema](#response-400-schema).
