Overview of Singpass
Last updated
Last updated
Singpass is Singapore's national digital identity authentication provider using the protocol. It stores users' identity information and authenticates them for transactions with government agencies and private organizations online.
offers various authentication flows for integration between an OpenID Provider (OP) and a Relying Party (RP). Singpass as the OpenID Provider supports only the authorization code flow. This flow is the most widely used OpenID Connect authentication method, ideal for web applications and native applications that employ a client/server architecture. In this more secure and confidential flow, instead of returning the ID and access tokens directly to the Relying Party, an authorization code is provided. The Relying Party can then exchange the code for the necessary tokens. This flow requires the Relying Party to manage the parsing of JWT used in , as detailed in our integration guide.
At a high level, this flow has the following steps:
1
The user attempts to access a protected resource on your mobile/web application that requires authentication.
2
Since the user is not authenticated, your application sent an authorization code request to Singpass. The request must include parameters like relying party's client ID and redirect URI.
3
Singpass prompts the user to log in if they are not already authenticated.
4
The user provides their credentials to Singpass to authenticate the request.
5
After successful authentication, authorization code will be provided. In addition, authenticated session of the user is maintained on Singpass.
6
Upon receiving the authorization code, your application to make a token request to Singpass's token endpoint to exchange it for access and/or refresh tokens. The request must include parameters like authorization code, client ID, and redirect URI.
7
Singpass will retrieve the encryption and signing keys of your application to validate the authenticity of the request.
8
Once the request has been validated, Singpass will return ID Token, and Access Token/Refresh Token back to your application.
9
Optionally, your application can fetch Singpass' signing public key via JWKS URL to validate Singpass token's signature.
10
With the access token, users can now access protected resources on your mobile/web application.
If you're integrating with an OIDC provider for the first time, begin by before proceeding with the integration.
If you're ready to try out Singpass, .