79199593

Date: 2024-11-18 10:44:30
Score: 1
Natty:
Report link

Well, thanks again for the help @Toerktumlare, the solution basically is the following, based on the content linked in your comments:

This way when the /login is invoked with POST, it is ignored by the CSRF check so it is allowed, but due to the deferred opt-out config, a CSRF token is being generated and returned in the HTTP response. Also I get the expected HTTP 204 response for the login, instead of a 302 redirect. I can use the token from the response in the subsequent POST calls (I made the appropriate changes on our front-end too).

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @Toerktumlare
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Gábor Major