Closed Buco7854 closed 3 days ago
By default it does not allow automatic registration. The users have to be created ahead of time either by REST API or manually adding them through PocketBase.
I will add an env var in the future to allow automatic registration via OAuth2.
If you need to do this now, toggle off this switch on /_/#/settings
Then edit the users
collection:
In "API Rules" change the "Create rule" to @request.context = "oauth2"
Then go back to /_/#/settings
and toggle the switch back on.
Thanks a lot. Will there be a way to auto provision roles based on oidc claims?
I'll look into it. For now every new registration should get the user
role. If you need to set someone to admin
or readonly
, you can do so in the PocketBase users table.
Note that PocketBase admin accounts are separate from Beszel user accounts, so if you want someone to be able to log into PocketBase, you need to create an admin account for them at /_/#/settings/admins
.
I'll look into it. For now every new registration should get the
user
role. If you need to set someone toadmin
orreadonly
, you can do so in the PocketBase users table.Note that PocketBase admin accounts are separate from Beszel user accounts, so if you want someone to be able to log into PocketBase, you need to create an admin account for them at
/_/#/settings/admins
.
Yes I did that, thanks, just wanted to know if it was planned. Pocketbase does not support oidc enrollment for admin sadly but it's fine.
Thanks for your time 😁.
Hello, I setup OIDC with Authentik. When I try to login with OIDC for the first time (did not try with already existing user) I get the following log.