question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Manually going to `/me` url redirects to `/` when authenticated

See original GitHub issue

Steps to reproduce

  • Sign in
  • Enter url /me (not by clicking in header) OR
  • Sign in
  • Go to /me by clicking in header
  • Refresh /me page

Expected Behavior

/me page should be shown since user is already authenticated.

Actual Behavior

User is redirected first to /signin then to /.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
rkobergcommented, Dec 14, 2016

A server side render with este is never authenticated, so when it sees a request to a restricted path it will assume the user is unauthenticated and redirect. It is expected behavior

1reaction
rkobergcommented, Dec 14, 2016

Easiest: append the restricted path (?next=/me) on the server to the redirected URL and if the client is authenticated, redirect on the client. Another way would be to check for an authentication header and/or cookie on the server.

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - logged In user redirects to login page when entering ...
The issue here is that it seems your initial user state matches that of a confirmed unauthenticated user, so the auth wrapper incorrectly ......
Read more >
Redirect Users - Auth0
Redirect Users. You can return users to specific pages (URLs) within your application after validating their ID Tokens (authentication).
Read more >
Redirections in HTTP - MDN Web Docs - Mozilla
Permanent redirects to preserve existing links/bookmarks after changing the site's URLs, progress pages when uploading a file, etc. Principle.
Read more >
Original URL redirect after APM authentification - DevCentral
I need user gets automatically redirected to the original URI after the APM authentication is completed successfully.
Read more >
URL Redirects - Squarespace Help Center
You can create URL redirects to forward visitors away from pages that don't exist to active pages. This can be for permanent changes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found