Can server actions be called outside of the page?
Answered
Rule posted this in #help-forum
RuleOP
Hi. I'm planning to use server actions and I'd like to know if they can be called with a HTTP request for example. I'm thinking if I need to implement an authentication for a server action?
Answered by riský
Server actions can be called by an http request (it isn't the cleanest to do manually) and it can be run outside your app/website. For authentication you can utilize cookies as they would be sent to every request to your server.
2 Replies
@Rule Hi. I'm planning to use server actions and I'd like to know if they can be called with a HTTP request for example. I'm thinking if I need to implement an authentication for a server action?
Server actions can be called by an http request (it isn't the cleanest to do manually) and it can be run outside your app/website. For authentication you can utilize cookies as they would be sent to every request to your server.
Answer
RuleOP
Thanks for the answer. This helped me out