Skip to content

Authentication not working #1396

Answered by jmikrut
mrobst asked this question in Q&A
Nov 13, 2022 · 5 comments · 1 reply
Discussion options

You must be logged in to vote

Hey @mrobst — good catch RE: CSRF.

I think it's pretty tricky to properly diagnose a cookie being rejected due to CSRF reasons. Basically, if you have a serverURL defined, Payload will only allow a cross-origin cookie from that serverURL unless you explicitly define other domains that are safe.

This is obviously done for protection but it can be tough to expect.

I'm not sure yet a) how it worked at all after initial deployment, b) why it stopped working or c) why I need to add the (sub) domain for the admin page to the build options csrf.

Did you maybe add a serverURL at some point to your production instance? That would explain why it maybe started happening.

Regarding updating the doc…

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mrobst
Comment options

Answer selected by zubricks
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1395 on November 13, 2022 13:39.