From d55842aa6fe780389799518905ae06e9f73d4295 Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Tue, 31 May 2022 16:48:51 +0200 Subject: [PATCH 1/2] Force ofice 365 sign in to prompt user selection before sign in --- config/initializers/office365.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/office365.rb b/config/initializers/office365.rb index 4b3d4441cf..ce138835cb 100644 --- a/config/initializers/office365.rb +++ b/config/initializers/office365.rb @@ -10,7 +10,7 @@ class Office365 < OmniAuth::Strategies::OAuth2 option :name, 'office365' option :client_options, - site: 'https://login.microsoftonline.com/', + site: 'https://login.microsoftonline.com/?prompt=select_account', authorize_url: '/common/oauth2/authorize', token_url: '/common/oauth2/token' From 98b78eebd0488ca0b38537291f76849b8ab90e13 Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Wed, 1 Jun 2022 09:17:21 +0200 Subject: [PATCH 2/2] Move prompt param from url to authorize params --- config/initializers/office365.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/initializers/office365.rb b/config/initializers/office365.rb index ce138835cb..09106322b2 100644 --- a/config/initializers/office365.rb +++ b/config/initializers/office365.rb @@ -10,7 +10,7 @@ class Office365 < OmniAuth::Strategies::OAuth2 option :name, 'office365' option :client_options, - site: 'https://login.microsoftonline.com/?prompt=select_account', + site: 'https://login.microsoftonline.com/', authorize_url: '/common/oauth2/authorize', token_url: '/common/oauth2/token' @@ -25,6 +25,7 @@ def authorize_params end params[:scope] ||= DEFAULT_SCOPE + params[:prompt] = 'select_account' end end