🎉 Unlimited Free KYC - Forever!!

Auth + Data
Sign in API Reference
OIDC Config

OpenID Connect Discovery Endpoint

The OpenID Connect discovery endpoint provides a JSON document with information about the OpenID Provider's configuration. This allows clients to dynamically retrieve the information needed to interact with the OpenID Provider.

  • Base URL: https://didit.me
  • Endpoint: /.well-known/openid-configuration
  • Method: GET

Request

This endpoint doesn't require any parameters or authentication.

Example Request

GET /.well-known/openid-configuration HTTP/1.1
Host: didit.me

Response

Returns a JSON object containing the OpenID Provider's configuration information.

Example Response

{
    "issuer": "https://apx.didit.me",
    "authorization_endpoint": "https://apx.didit.me/auth/v2/authorize",
    "token_endpoint": "https://apx.didit.me/auth/v2/token",
    "userinfo_endpoint": "https://apx.didit.me/auth/v2/users/retrieve",
    "jwks_uri": "https://apx.didit.me/auth/jwks",
    "scopes_supported": ["openid", "offline", "user_id", "picture", "names", "email", "phone", "gender", "document_detail", "birthdate", "address", "bank_account", "preferences", "is_verified", "is_over_18", "is_over_21"],
    "response_types_supported": ["code"],
    "grant_types_supported": ["authorization_code", "refresh_token"],
    "subject_types_supported": ["pairwise"],
    "id_token_signing_alg_values_supported": ["RS256"]
}

Response Fields

  • issuer: The URL of the OpenID Provider (your authorization server).
  • authorization_endpoint: The URL of the authorization endpoint.
  • token_endpoint: The URL of the token endpoint.
  • userinfo_endpoint: The URL of the UserInfo endpoint.
  • jwks_uri: The URL of the JSON Web Key Set document.
  • scopes_supported: List of the OAuth 2.0 scope values supported.
  • response_types_supported: List of the OAuth 2.0 response_type values supported.
  • grant_types_supported: List of the OAuth 2.0 grant type values supported.
  • subject_types_supported: List of the subject identifier types supported.
  • id_token_signing_alg_values_supported: List of the JWS signing algorithms supported for the ID Token.

Error Responses

This endpoint typically only returns a 200 OK response with the configuration JSON. However, in case of errors:

  • 405 Method Not Allowed: If any HTTP method other than GET is used.

Example Error Response

{
    "error": "method_not_allowed",
    "error_description": "HTTP method is not allowed. Only GET and OPTIONS may be used."
}

Code Example

const fetchOpenIDConfiguration = async () => {
  const discoveryUrl = 'https://apx.didit.me/.well-known/openid-configuration';
 
  try {
    const response = await fetch(discoveryUrl);
 
    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }
 
    const config = await response.json();
    console.log('OpenID Configuration:', config);
    return config;
  } catch (error) {
    console.error('Error fetching OpenID configuration:', error);
    throw error;
  }
};

The OpenID Connect discovery endpoint is typically used during the initial setup of an OIDC client. It allows clients to automatically configure themselves by fetching the necessary endpoints and supported features from the OpenID Provider.