> For the complete documentation index, see [llms.txt](https://docs.developer.singpass.gov.sg/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.developer.singpass.gov.sg/docs/technical-specifications/technical-concepts/openid-connect-discovery.md).

# OpenID Provider Configuration

Singpass' authorization server exposes an endpoint from which you can retrieve metadata about how Singpass is configured as an OpenID Provider:

<table><thead><tr><th width="199">Environment</th><th>Discovery Endpoint</th></tr></thead><tbody><tr><td>Staging</td><td><a href="https://stg-id.singpass.gov.sg/fapi/.well-known/openid-configuration">https://stg-id.singpass.gov.sg/fapi/.well-known/openid-configuration</a></td></tr><tr><td>Production</td><td><a href="https://id.singpass.gov.sg/fapi/.well-known/openid-configuration">https://id.singpass.gov.sg/fapi/.well-known/openid-configuration</a></td></tr></tbody></table>

The metadata hosted at this endpoint is crucial for your integration. It tells you things like:

* The various endpoints and URIs that you will need, and
* Supported scopes, response types, and encryption/signing algorithms

Because [OpenID Connect Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) is part of the OIDC spec, if you are using an OpenID-certified relying party library, the library may automatically retrieve metadata from our discovery endpoint for you. In such cases, you may not be aware of this detail.

Please be aware, however, that Singpass' OpenID configuration is not static, and you should regularly fetch from our discovery endpoint to ensure freshness. At the same time, you should also avoid fetching from this endpoint too frequently, e.g. for every authentication request. Instead, consider caching responses for at least an hour.

{% hint style="warning" %}
Do not pin Singpass' TLS leaf certificates. Singpass reserves the right to rotate its TLS certificates without prior notice. Applications that pin the leaf certificate will break silently when rotation occurs. [Learn more](https://partnersupport.singpass.gov.sg/hc/en-sg/articles/43040167570457)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.developer.singpass.gov.sg/docs/technical-specifications/technical-concepts/openid-connect-discovery.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
