-
Notifications
You must be signed in to change notification settings - Fork 2k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not getting the user data and cookies #10149
Comments
Please add a reproduction in order for us to be able to investigate. Depending on the quality of reproduction steps, this issue may be closed if no reproduction is provided. Why was this issue marked with the
|
authenticate: async ({ payload, headers }: AuthStrategyFunctionArgs): Promise<AuthStrategyResult> => {
const cookie = parseCookies(headers),
token = cookie.get('token');
console.log('token', token);
return { user: null }
}; these cookies are available, except in the Working on a sample example project |
The repo is this one: https://github.com/RPdvtPT/payload-strategy-test This is a simple version without OpenID and JWT |
Hey @RPdvtPT — the https://payloadcms.com/docs/hooks/collections#me From the docs:
This effectively allows you to override the logic in the https://github.com/payloadcms/payload/blob/main/packages/payload/src/auth/operations/me.ts You should be able to wire this up accordingly, but as far as how it is behaving now, that would be expected. I will convert this to a discussion to continue to provide help. I bet this will also be useful for others, too! |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Describe the Bug
I'm using a Custom Strategy to login via OpenID without the login form:
This is my auth file:
But the response from
/api/users/me
is this one:With a custom API this also returns
null
in theuser
property:This is the request:
Link to the code that reproduces this issue
https://github.com/RPdvtPT/payload-strategy-test
Reproduction Steps
/api/users/me
responsesWhich area(s) are affected? (Select all that apply)
Not sure
Environment Info
The text was updated successfully, but these errors were encountered: