Authentication success callback not setting local storage #220
Unanswered
BustosAndrew
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Hard to tell from just this snippet. What is |
Beta Was this translation helpful? Give feedback.
1 reply
-
here is the html script tag: window.onload = () => {
// const accessToken = document.cookie.split("; ").find((row) => row.startsWith("access_token="))?.split("=")[1];
const accessToken = window.ls.get("access_token");
if (accessToken) {
const folderID = "0";
const contentExplorer = new Box.ContentExplorer();
contentExplorer.show(
folderId,
accessToken,
{
container: ".container"
}
);
document.getElementById("log").innerHTML += `${accessToken}`;
}
else {
document.getElementById("log").innerHTML += `${window.ls.get("failed")}`;
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
here is the js code inside a react component:
Failure callback always works, but upon successful login it never sets local storage. ls is some node module for handling local storage. To confirm, the start and end page of the auth flow are on the same domain.
Here is a vid describing the issue: https://youtu.be/qdyLejGBdE8
Any way to fix this?
Beta Was this translation helpful? Give feedback.
All reactions