BOX Authentication issue since access token is getting expired within very few minutes in UI (developed using React JS)
Hi Team,
We have created a BOX Application using OAuth 2.0 User Authentication and have developed a UI using ReactJS. In UI, we have implemented BOX API’s to authorize users and to fetch file data from BOX folder.
We have pushed the code to GitLab and on accessing project URL we notice the following issues frequently,
- net::ERR_CONNECTION_REFUSED or net::ERR_FAILED - while trying to fetch access token using https://<B2B GatewayURL> /boxoauth/token API.
- CORS Issue (In spite of enabling CORS option in BOX App) – Error msg : Access to XMLHttprequest has been blocked by CORS policy.
- Unknown error Status of code 0 - while fetching data from some files using BOX API.
In UI even after the user is authenticated and access token is fetched, sometimes within few minutes again the access token and refresh token is expired and asks for user re-authentication again. Above are the errors noted in the developer console of the application in this kind of scenarios.
Note - We are using the B2B Gateway Host URL’s for BOX API’s in the application depending on the environment dev/prod/test. As of now we are using Test URL, so will the issues resolve if we use the Prod URL?
Please suggest solutions to resolve the issues.
Please sign in to leave a comment.
Comments
0 comments