[Keycloak Error] Invalid state
Closed this issue · 3 comments
After registration gives me this error:
Vizir\KeycloakWebGuard\Exceptions\KeycloakCallbackException
[Keycloak Error] Invalid state
File: vendor\vizir\laravel-keycloak-web-guard\src\Controllers\AuthController.php:72
Help me solve this problem
Hi! State is a value persisted to ensure the continuous of the auth flow.
Check you are persisting it well.
Please check our README:
https://github.com/Vizir/laravel-keycloak-web-guard#where-the-accessrefresh-tokens-and-state-are-persisted
Привет! Состояние - это значение, которое сохраняется для обеспечения непрерывности потока аутентификации.
Убедитесь, что вы хорошо его сохраняете.Пожалуйста, проверьте наш README:
https://github.com/Vizir/laravel-keycloak-web-guard#where-the-accessrefresh-tokens-and-state-are-persisted
Hey! I solved the problem! By adding KeycloakWeb::saveState(); to src/Controllers/AuthController.php in the register method after $url = KeycloakWeb::getRegisterUrl(); line:46 .
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.