Skip to main content

Hello everyone,

I’m integrating Box.com into my React application. When I redirect users to this URL

for Box login,


const boxAuthUrl = `https://account.box.com/api/oauth2/authorize?response_type=code&client_id=${encodeURIComponent(CLIENT_ID)}&redirect_uri=${encodeURIComponent(BOX_REDIRECT_URI)}

i’m facing an issue with some accounts. Often, when the user is redirected, they end up at a different URL.


How can I resolve this issue? Can anyone help?

Hi @user135


I have this behavior when I’m developing in my machine and I have another box account logged in the browser.


Log out from box or close the browser.


Not sure if this is your use case, let us know


Cheers


Hello @rbarbosa

This issue occurs when a user’s account has two-step verification enabled, sometimes it redirects to this URL. How can i fix this issue?


Hi @user135


If I’m understanding the problem, it should work just the same, the problem seems to be the multiple cookies and sessions.


Here is a video of a python sample app testing OAuth 2.0 authorization:




Let us know if this helps.


Reply