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
Hi, thanks for all the work on v3 and making the library compatible with the Next.js App Router. I am mostly curious about the recommended way to use the library with react server actions. I noticed in the withApiAuthRequired method, there are some cookie related logic (setting cookies, etc) and was wondering about the best practice when using the library with server actions.
Describe the ideal solution
I do not have an ideal solution in mind, but here are some potential solutions (one I can think of):
A "higher order" server action that accepts a server action and and returns a server action after performing authentication related logic.
Expose necessary primitives with detailed code snippets on how to use them with server actions. Could be extended to API routes too.
If no new feature needed, examples on how to deal with authentication inside server actions.
The text was updated successfully, but these errors were encountered:
Checklist
Describe the problem you'd like to have solved
Hi, thanks for all the work on v3 and making the library compatible with the Next.js App Router. I am mostly curious about the recommended way to use the library with react server actions. I noticed in the
withApiAuthRequired
method, there are some cookie related logic (setting cookies, etc) and was wondering about the best practice when using the library with server actions.Describe the ideal solution
I do not have an ideal solution in mind, but here are some potential solutions (one I can think of):
The text was updated successfully, but these errors were encountered: