Closed Misaka-L closed 4 months ago
Thanks for reporting @Misaka-L. I could confirm that BookStack was not differentiating between non-provided and an empty groups list in the OIDC ID token data, and therefore would default to calling the userinfo endpoint upon an empty group list in an attempt to gain more information.
I'm not sure why the userinfo call was failing for you though, I did double check this against a live OIDC system to ensure the userinfo part works as expected, which it does from my test.
Otherwise, I've addressed the providing of empty groups in commit 767699a0664c13fea1293654578f571ec4a08fa3, so the userinfo won't be called if a valid empty group list is provided, and this will be part of the next patch release.
Describe the Bug
If the
roles
field in the response of the OIDC system is a empty array and user try to login without exist user in bookstack, they will get this error:Steps to Reproduce
Expected Behaviour
User login success and create a new bookstack account with a default role if the groups claims is empty (it should can be config by editing
.env
or web ui?).Screenshots or Additional Context
OIDC User info dump
.env
Browser Details
Microsoft Edge 127.0.2651.15 Beta (64-bit) on Windows 11 24H2 (26120.961)
Exact BookStack Version
v24.05.2