feat: move Azure config to installation_config (#9481)
This PR has the following changes 1. Add `AZURE_APP_ID` and `AZURE_APP_SECRET` to installation config 2. Add Microsoft config to `super_admin/features.yml` 3. Replace usage of `ENV.fetch` with `GlobalConfigService.load` for fetch App ID and Secret
This commit is contained in:
@@ -2,7 +2,10 @@ module MicrosoftConcern
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
def microsoft_client
|
||||
::OAuth2::Client.new(ENV.fetch('AZURE_APP_ID', nil), ENV.fetch('AZURE_APP_SECRET', nil),
|
||||
app_id = GlobalConfigService.load('AZURE_APP_ID', nil)
|
||||
app_secret = GlobalConfigService.load('AZURE_APP_SECRET', nil)
|
||||
|
||||
::OAuth2::Client.new(app_id, app_secret,
|
||||
{
|
||||
site: 'https://login.microsoftonline.com',
|
||||
authorize_url: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
|
||||
|
||||
Reference in New Issue
Block a user