Skip to content

Protected Routes Implementation #92

Answered by tannerlinsley
UbaidRajputt asked this question in Q&A
Discussion options

You must be logged in to vote

I've added a new documentation page to gather the official recommendations: https://tanstack.com/router/v1/docs/guide/authenticated-routes

To hit on a few other points:

  • The entire router, including the concept of loaders is isomorphic, so it's absolutely a normal use case that people will be hitting non-authenticated API calls, but maybe not the majority use case.
  • There will absolutely be larger non-hobby projects (like Nozzle, for instance) that hit public, non-protected APIs in loaders.
  • Because of Router's isomorphic nature and it's lean towards SPAs, it's just as easy to implement authenticated routes via render short circuiting as it is to do login redirection, both of which are ment…

Replies: 9 comments 21 replies

Comment options

You must be logged in to vote
3 replies
@tannerlinsley
Comment options

@Angelelz
Comment options

@sethbro
Comment options

Comment options

You must be logged in to vote
1 reply
@Codpoe
Comment options

Comment options

You must be logged in to vote
5 replies
@m7ez1n
Comment options

@Angelelz
Comment options

@danielbayerlein
Comment options

@borie88
Comment options

@drock07
Comment options

Comment options

You must be logged in to vote
4 replies
@calloc134
Comment options

@mudai11
Comment options

@shreddish
Comment options

Answer selected by tannerlinsley
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@l-baston
Comment options

@l-baston
Comment options

Comment options

You must be logged in to vote
3 replies
@iamrakhmatov
Comment options

@iamrakhmatov
Comment options

@l-baston
Comment options

Comment options

You must be logged in to vote
2 replies
@Benanna2019
Comment options

@shlroland
Comment options

Comment options

You must be logged in to vote
1 reply
@iam-amanxz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet