info:To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
info:To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
---
# Sign into GitLab with (almost) any OAuth2 provider **(FREE SELF)**
# Generic OAuth2 provider **(FREE SELF)**
The `omniauth-oauth2-generic` gem allows Single Sign-On between GitLab and your own OAuth2 provider
The `omniauth-oauth2-generic` gem allows single sign-on (SSO) between GitLab
(or any OAuth2 provider compatible with this gem)
and your OAuth2 provider (or any OAuth2 provider compatible with this gem).
This strategy is designed to allow configuration of the simple OmniAuth SSO process outlined below:
This strategy allows for the configuration of this OmniAuth SSO process:
1. Strategy directs client to your authorization URL (**configurable**), with specified ID and key
1. Strategy directs the client to your authorization URL (**configurable**), with
1. OAuth provider handles authentication of request, user, and (optionally) authorization to access user's profile
the specified ID and key.
1. OAuth provider directs client back to GitLab where Strategy handles retrieval of access token
1. The OAuth2 provider handles authentication of the request, user, and (optionally)
1. Strategy requests user information from a **configurable** "user profile" URL (using the access token)
authorization to access user's profile.
1. Strategy parses user information from the response, using a **configurable** format
1. The OAuth2 provider directs the client back to GitLab where Strategy handles
1. GitLab finds or creates the returned user and logs them in
the retrieval of the access token.
1. Strategy requests user information from a **configurable** "user profile"
URL (using the access token).
1. Strategy parses user information from the response, using a **configurable**
format.
1. GitLab finds or creates the returned user and signs them in.
## Limitations of this Strategy
## Limitations of this strategy
- It can only be used for Single Sign on, and doesn't provide any other access granted by any OAuth provider
- It can only be used for single sign-on, and doesn't provide any other access
(importing projects or users, etc)
granted by any OAuth2 provider (like importing projects or users).
- It only supports the Authorization Grant flow (most common for client-server applications, like GitLab)
- It supports only the Authorization Grant flow (most common for client-server
- It is not able to fetch user information from more than one URL
applications, like GitLab).
- It has not been tested with user information formats other than JSON
- It can't fetch user information from more than one URL.
- It hasn't been tested with user information formats, other than JSON.
## Configuration Instructions
## Configure the OAuth2 provider
1. Register your application in the OAuth2 provider you wish to authenticate with.
To configure the provider:
1. Register your application in the OAuth2 provider you want to authenticate with.
The redirect URI you provide when registering the application should be:
The redirect URI you provide when registering the application should be:
...
@@ -36,13 +44,13 @@ This strategy is designed to allow configuration of the simple OmniAuth SSO proc
...
@@ -36,13 +44,13 @@ This strategy is designed to allow configuration of the simple OmniAuth SSO proc