Skip to content

Commit ede5808

Browse files
committed
chore: defensive microsoft auth request
1 parent 889023c commit ede5808

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/omniauth/strategies/microsoft_graph.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ def profile_endpoint
8787
end
8888

8989
def determine_profile_endpoint(request)
90-
if request.env['omniauth.params']['scope']&.include? 'yammer'
90+
scope = request&.env&.dig('omniauth.params', 'scope')
91+
92+
if scope&.include?('yammer')
9193
YAMMER_PROFILE_URL
9294
else
9395
MICROSOFT_GRAPH_PROFILE_URL

0 commit comments

Comments
 (0)