This guide uses GitHub as an example SSO identity provider, demonstrating how to enable OAuth2 authorization for Dify Enterprise Edition.By enabling this feature, the login page in Enterprise Edition will utilize a unified authentication portal to enhance security. For internal enterprise users, there’s no need to set up complex passwords—logging in with an organizational account streamlines the process.
Depending on the SSO scope you intend to enable, the Callback URL may differ. The system administrator needs to paste the Dify Enterprise Callback URL into the corresponding GitHub OAuth2 application in order to complete the setup.
In the Dify Enterprise Authentication page, under Workspace Settings, click + New Identity Provider → New OAuth2 Provider, then find the Callback URL at the bottom.It typically follows this format:
Go to the Dify Enterprise Authentication page, click + New Identity Provider → New OAuth2 Provider, and enter the details as prompted to complete the configuration.Retrieve the following information from your OAuth application:
Client ID
Client Secret
Different OAuth2 providers may require different credentials, as outlined by each provider’s official documentation. The following items are for reference and may be adjusted as needed: