Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jlmmns's avatar
Level 12

[iOS] Re-opening Safari app causes TokenMismatchException when logging in

I get a lot of TokenMismatchExceptions, simply because of iOS' Safari app not refreshing the CSRF token when re-opening the app.

Scenario:

  1. Log out
  2. Close Safari app on login view
  3. Open Safari app (no manual refresh)
  4. Login
  5. TokenMismatchException

How do I catch this before the error occurs? Forcing a page refresh, somehow?

0 likes
0 replies

Please or to participate in this conversation.