Skip to content

Commit

Permalink
🐛 Prompt for Google account instead of choosing the same every time
Browse files Browse the repository at this point in the history
Why:
- If you logged in once with a Google account, then Auth0 would keep
  using that same account on subsequent logins. This fixes that so that
  it'll give you the list of Google accounts to choose from.
    https://community.auth0.com/t/how-do-i-force-the-universal-login-to-allow-the-user-to-select-a-gmail-account/72655/11
    https://community.auth0.com/t/allow-user-using-google-oauth2-authentication-to-pick-google-account-do-not-sign-in-automatically/64331
    https://developers.google.com/identity/openid-connect/openid-connect#prompt
- Facebook login has the same problem. There is no known fix.
    auth0/Auth0.Android#604
  • Loading branch information
luontola committed Mar 18, 2024
1 parent 0dfd293 commit b1b846d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/territory_bro/infra/auth0.clj
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
[servlet-request servlet-response *ring-response] (ring->servlet ring-request)
authorize-url (-> (.buildAuthorizeUrl auth-controller servlet-request servlet-response callback-url)
(.withScope "openid email profile")
(.withParameter "prompt" "select_account")
(.build))]
(meta-merge @*ring-response
(response/redirect authorize-url :see-other))))
Expand Down
2 changes: 1 addition & 1 deletion web/src/authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function auth0Authenticator(settings: Settings) {
}

function login() {
webAuth.authorize();
webAuth.authorize({prompt: "select_account"});
}

function logout() {
Expand Down

0 comments on commit b1b846d

Please sign in to comment.