Skip to content

Commit

Permalink
small formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
horeaporutiu committed Mar 15, 2024
1 parent 3d33bd7 commit f7c9fa6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions examples/3rd-party-oauth-login/src/backend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,21 @@ app.get("/redirect", async (req, res) => {
<h3>Access Token: ${tokenResponse.data.access_token}</h3>
<h3>User marked as logged in in (browser) localStorage. </h3>
<script>
window.opener.postMessage({ redirectSuccess: true}, '*');
const timeoutId = setTimeout(() => {
window.close();
}, 5000);
window.opener.postMessage({ redirectSuccess: true}, '*');
const timeoutId = setTimeout(() => {
window.close();
}, 5000);
</script>
`);
} else {
res.send(`
<h1>Status Code: ${res.statusCode}</h1>
<h2>Auth failed! Check your redirect URL. The window will close in 10 seconds.</h2>
<script>
window.opener.postMessage({ redirectSuccess: false}, '*');
const timeoutId = setTimeout(() => {
window.close();
}, 5000);
window.opener.postMessage({ redirectSuccess: false}, '*');
const timeoutId = setTimeout(() => {
window.close();
}, 5000);
</script>
`);
}
Expand Down

0 comments on commit f7c9fa6

Please sign in to comment.