Support passing payload-token into local API operations #9460
Closed
robertmalicke
started this conversation in
Feature Requests & Ideas
Replies: 1 comment
-
The solution is to use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This discussion is to add functionality to the local payload server API so that the auth token
payload-token
can be passed into it to get the current user. If users would like to adopt a server-first approach in nextjs with server components and server actions, then they will be using the local API, and they will have a payload-token as a cookie. They will need to exchange a payload-token to get the current user.Current possibilities:
Currently, it seems unclear how we are supposed to use the local API to authorize users. It is nice to leverage the /api/user/login endpoint to set a cookie, but then what are we supposed to do with it in a server action or component?
Thanks for all your hard work!
Beta Was this translation helpful? Give feedback.
All reactions