spookygames / flarum-ext-auth-keycloak

Keycloak OAuth Flarum Extension
MIT License
17 stars 3 forks source link

Allow login on failure to update local cache #6

Closed jcosmo closed 3 years ago

jcosmo commented 4 years ago

https://github.com/spookygames/flarum-ext-auth-keycloak/blob/9fcd9393c44fca36764b67fa2dc466b3e8148b05/src/KeycloakAuthController.php#L155

For some reason this call has started to fail on my instance of flarum. Unfortunately no actual error message is shown, just "Failed to update Flarum user:". It seems to be related to updating the primary "admin" account, perhaps attempting to take away admin rights. Possibly because the updating user is trying to remove admin rights from themselves.

Ideally this would log the failure to update and allow login? Perhaps this could be a system setting.

arthurtemple commented 4 years ago

Thanks for the feedback! Did not know there were users of this thing.

Seems sensible to log instead of crash. I have no clue how to log with this stuff actually, but could simply not crash and get on with it.

arthurtemple commented 3 years ago

I think https://github.com/spookygames/flarum-ext-auth-keycloak/commit/10b204a78ea1b194a678faba2af2ffa57f938da2 should handle this. Feel free to re-open if needed.