Hi, just a quick question. If I do not want SSR, i...
# ory-network
p
Hi, just a quick question. If I do not want SSR, is there a possible way to safely handle/prevent csrf attacks sincec now csrf tokens can't be sent along with HTML?
p
Hi @purple-kilobyte-92359 how are you rendering the UI? is it frontend only since you do not want server-side rendering? The csrf token can still be set on the UI in a frontend only codebase (SPA) since the token is sent with the login/registration/verification/recovery/settings json payload. Ory uses a synchronizer token pattern which sets an additional csrf cookie in the browser. This is automatically set in fetch if you allow credentials. https://www.ory.sh/docs/kratos/concepts/security#defenses-against-cross-site-request-forgery