ScopeLift / gitcoin-web

🤖Grow Open Source
https://gitcoin.co
Other
1 stars 0 forks source link

Require Cart Login Before Bulk Grants Checkout #24

Closed apbendi closed 4 years ago

apbendi commented 4 years ago

Hey @owocki, this is one where we could use a hit to save us some time. What would be the easiest way to detect if the user is logged in or not, then redirect them to a login page from the cart if not.

owocki commented 4 years ago

document.contxt['github_handle'] in JS will do it

owocki commented 4 years ago

document.contxt['github_handle'] in JS will do it

mds1 commented 4 years ago

Using JS, how can we redirect to the login screen and navigate back to the cart page after login?

owocki commented 4 years ago

send the user to '/login/github?next=' + REDIRECT_URL