Lurker News

Comments (247) 63 threads

Show all comments

Showing thread 25 of 63

nodesocket1 reply#
Couldn't this be fixed by instead of using ?next= in the query string storing a cookie.

For example:

    if(!auth) {
        setCookie('next', '/url-here', 1h);
    }
    redirect(login);
Login page action:

    if(cookieExists('next')) {
        next = getCookie('next');
        deleteCookie('next');
        redirect(next);
    } else {
        redirect('dashboard');
    }
detaro#
Could easily muddle state with multiple tabs though, query string is clearer.