Skip to content

Commit

Permalink
fix(auth): handle redirect server-side
Browse files Browse the repository at this point in the history
  • Loading branch information
g-div committed Mar 2, 2018
1 parent a2cbd1e commit 30881d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ function run(db) {
});

app.get('/success', (request, reply) => {
const schnackDomain = getSchnackDomain();
reply.send(`<script>
document.domain = document.domain.split('.').slice(1).join('.');
document.domain = '${schnackDomain}';
window.opener.__schnack_wait_for_oauth();
</script>`);
});
Expand Down

0 comments on commit 30881d8

Please sign in to comment.