Skip to main content

How GOV.UK Sign In works

GOV.UK Sign In is an OpenID Connect (OIDC)-compliant service that helps you authenticate your users who are using their GOV.UK Account.

GOV.UK Sign In uses 2 different environments:

  • an integration environment, which contains sample users and data for you to test your service’s integration with GOV.UK Sign In
  • a production environment, which is the live environment for real users to access and use your service’s integration with GOV.UK Sign In

Understand the flow GOV.UK Sign In uses

  1. Your service asks the user to sign in or create an account.
  2. If your service needs confidence your user is who they say they are, GOV.UK Sign In will request proof of identity.
  3. GOV.UK Sign In collects evidence of the user’s identity.
  4. GOV.UK Sign In provides information about your user.

You can read guidance about cookies on GOV.UK if you want to learn more about cookies for GOV.UK Accounts.

To understand the technical flow, for example the endpoints, requests and tokens, there’s a more detailed technical diagram you can use.

Understand the technical flow GOV.UK Sign In uses

  1. To make an authorisation request, your service sends the user to the /authorize endpoint.
  2. The user logs in (or creates an account if they do not have one) and proves their identity if your service needs them to. GOV.UK Sign In lets your user know how their data will be shared with your service.
  3. GOV.UK Sign In returns an authorisation code to your service.
  4. Your service makes a token request to the /token endpoint and includes the authorisation code in the request.
  5. Your service receives an ID token, an access token and a refresh token in the response.
  6. Your service makes a request to the /userinfo endpoint to retrieve user information. You can read more about choosing which user attributes your service can request.
  7. Your service receives a response containing user attributes.

You can get started with integrating with GOV.UK Sign In’s integration environment.

This page was last reviewed on 10 June 2022.