T
tRPC

❓-help

Force user to login

KKurooo12/20/2023
How can I redirect the user to "/login" if the user are not logged in?
No description
BBeBoRE12/20/2023
If you are using React Query you can do this with a global callback, if you are using the vanilla client you can take a look if you can change the behavior on errors by changing the http linker.
KKurooo12/20/2023
im using t3 stack so i guess im using react-query

Looking for more? Join the community!