Skip to content

Commit 6dfa3ce

Browse files
joshk0marknadig
authored andcommitted
Fix creating a client when there is no live request (#20)
1 parent 8092eda commit 6dfa3ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/omniauth/strategies/azure_oauth2.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def client
3232

3333
options.authorize_params = provider.authorize_params if provider.respond_to?(:authorize_params)
3434
options.authorize_params.domain_hint = provider.domain_hint if provider.respond_to?(:domain_hint) && provider.domain_hint
35-
options.authorize_params.prompt = request.params['prompt'] if request.params['prompt']
35+
options.authorize_params.prompt = request.params['prompt'] if defined? request && request.params['prompt']
3636
options.client_options.authorize_url = "#{options.base_azure_url}/#{options.tenant_id}/oauth2/authorize"
3737
options.client_options.token_url = "#{options.base_azure_url}/#{options.tenant_id}/oauth2/token"
3838
super

0 commit comments

Comments
 (0)