Is there a way to specify a username (or login hint) to the Box OAuth flow

StackOverflow https://stackoverflow.com/questions/22387699

  •  14-06-2023
  •  | 
  •  

سؤال

Is there a way to specify the desired login/user name to use when starting an OAuth authorization flow with Box? If I happen to know that the user should be linking to a particular Box account, I would like to be able to specify it when starting the first leg of the OAuth flow.

For example, when I discover that the user must reauthorize an existing account, I would like to make sure that the Box login page shows the user name of that account as its default user name. This is particularly important when the user has more than one Box account--we don't want to accidentally connect them to the wrong account. Right now, the user has to remember which account they think they are authenticating, and enter that username and password in the login page.

With the Google OAuth service, you can provide a login_hint parameter in the authorization URL. This tells Google which user you expect to be authenticating. If the currently logged in user (of the browser) is not that user, they will show the login page with that user selected. If the browser is currently logged into multiple accounts, they will select the one that matches the expected login name.

هل كانت مفيدة؟

المحلول

Try adding &box_login=your_user_username to the login URL.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top