This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Azure AD omniauth provider
To set up this up, you are required to create a new "App registration" within the Azure Active Directory service. Keep note of the Application ID, as this will be the Client ID required for the AAD_CLIENT_ID env variable. You will also be required to add the callback URL to the "reply URL" within the app registry properties, e.g. 'http://localhost:3000/auth/azureactivedirectory/callback'. Currently there is an issue with the omniauth-azure-activedirectory gem whereby we need to require the 'net/http' gem in order for the callback to be registered. See the following open issue for more details: AzureAD/omniauth-azure-activedirectory#21
- Loading branch information
Tom Sabin
committed
Jul 6, 2018
1 parent
f3d20c8
commit 73959b4
Showing
6 changed files
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
# We have to manually include a missing dependency for the | ||
# omniauth-azure-activedirectory gem before we can use it. | ||
# https://github.com/AzureAD/omniauth-azure-activedirectory/issues/33 | ||
# https://github.com/AzureAD/omniauth-azure-activedirectory/pull/31 | ||
require 'net/http' | ||
|
||
OmniAuth.config.logger = Rails.logger | ||
|
||
Rails.application.config.middleware.use OmniAuth::Builder do | ||
provider :developer | ||
provider :azure_activedirectory, ENV['AAD_CLIENT_ID'], ENV['AAD_TENANT'] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters