layout for api #11873
-
hi /routes/api/(protected)/users/+server.ts and all routes within the (protected) group have a authentication step before actually accessing the endpoint |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Look into server hooks. You can have the hook redirect the user to the authentication page if they are not authenticated, or let the request go through if they are. |
Beta Was this translation helpful? Give feedback.
Look into server hooks. You can have the hook redirect the user to the authentication page if they are not authenticated, or let the request go through if they are.