T
TanStack11mo ago
stormy-gold

Create a one-time view page

I'm building an order spa using tanstack router. I have one route (index) and it has lot of forms, sheets, etc after the user fills out the forms and do the payment, I want to push it to another route /confirmation and show the order details. Is there a way to achieve these: - Dont add the confirmation route to the history - Disable the route if the payment is pending (dont allow the user go to the confirmation page) - Avoid using localstorage/sessionstorage/cookies for security policies Thanks in advance
1 Reply
wise-white
wise-white11mo ago
Dont add the confirmation route to the history
did you try out replace: true on the link / navigate call?
Disable the route if the payment is pending (dont allow the user go to the confirmation page)
what "disabling" mean really? I would throw a redirect when a user tries to access a page he should not. same as the standard auth mechanism
Avoid using localstorage/sessionstorage/cookies for security policies
what does this mean? how is this related to the other things?

Did you find this page helpful?