Skip to content

Commit

Permalink
fix: quote auth code in localstorage js
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoesbergen committed Dec 29, 2023
1 parent d2e6083 commit 7aae663
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ app.get("/authed", async function(req, res) {
const code = randomUUID();
authorized[code] = output.firstName;

res.send("<script>localStorage.code="+code+";localStorage.person='"+output.firstName+"';location.href = '/editor';</script>");
res.send(`<script>localStorage.code="${code}"; localStorage.person="${output.firstName}"; location.href = "/editor";</script>`);
} else {
res.send("<script>localStorage.person='"+output.firstName+"';location.href = '/lid';</script>");
res.send(`<script>localStorage.person="${output.firstName}"; location.href = "/lid";</script>`);
}
});
}).on("error", function () {
Expand Down

0 comments on commit 7aae663

Please sign in to comment.