mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-17 18:09:09 +00:00
feat(web): wire up discord auth button
This commit is contained in:
parent
0a399938d6
commit
3a36d7a85d
2 changed files with 16 additions and 3 deletions
|
@ -5,8 +5,10 @@ const NewSession = () => {
|
|||
const url = new URL(window.location.href);
|
||||
const id = url.searchParams.get('session_id');
|
||||
if (id) {
|
||||
window.location.href = '/';
|
||||
localStorage.setItem('rp_session_key', id);
|
||||
|
||||
const redirectUrl = localStorage.getItem('rp_postauth_redirect');
|
||||
window.location.href = redirectUrl || '/';
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue