Skip to content

Added redirect and user context opt-out for private pages.#120

Open
edyhtan wants to merge 3 commits intodevfrom
private_page_gating
Open

Added redirect and user context opt-out for private pages.#120
edyhtan wants to merge 3 commits intodevfrom
private_page_gating

Conversation

@edyhtan
Copy link
Copy Markdown
Collaborator

@edyhtan edyhtan commented Feb 4, 2021

  • Added redirect to log in for pages that explicitly require a current user: contest creation, submission, and messenger.
  • Automatically reset UserContext if the existing token is long expired.


if (user.username === "no-user") {
return (
<Redirect to='/login'/>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm with this, if user doesn't load just yet, will this redirect to login? for example if you refresh this submit design page, the user i'm guessing won't load as fast as this page gets rendered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants