You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow the developers to define URL Prefix for the Server Actions
Non-Goals
No response
Background
This is to enable to authenticate the server actions in the middleware.
Proposal
Something like if we can put this in action.ts
export const prefix='/auth'
Then we match the prefix in the middleware to do the authentication. I think the only way now is to check it when the request is 'POST' but there could some actions that can be executed when not logged in. Just an idea but I think this will help with debugging too since finding the Network calls in server action would be easier.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
No response
Background
This is to enable to authenticate the server actions in the middleware.
Proposal
Something like if we can put this in action.ts
Then we match the prefix in the middleware to do the authentication. I think the only way now is to check it when the request is 'POST' but there could some actions that can be executed when not logged in. Just an idea but I think this will help with debugging too since finding the Network calls in server action would be easier.
Beta Was this translation helpful? Give feedback.
All reactions