Multiple Umbraco instances - one "master" backoffice memebership provider
I have a solution involving multiple Umbraco instances. I would like one of them to act as master regarding the backoffice accounts.
As far as I understand, I need to create a custom UsersMembershipProvider, which first tries to authorize the user against the master instance. If a user successfully authorizes against the master instance, I would need to create or update a local user in the current instance, correct?
When fetching the remote user, how am I supposed to extract data like "role" (admin, editor etc) and other settings like permissions?
Finally, if I create a new user, how to sign it in programatically?
You can create users manually during login process, if the user doesn't exist in Umbraco but is valid from external API. So basically you don't have to have all users in Umbraco.
What about user groups?
Would you create the same user groups in Umbraco instances?
You can create users manually during login process, if the user doesn't exist in Umbraco but is valid from external API. So basically you don't have to have all users in Umbraco.
Multiple Umbraco instances - one "master" backoffice memebership provider
I have a solution involving multiple Umbraco instances. I would like one of them to act as master regarding the backoffice accounts.
As far as I understand, I need to create a custom
UsersMembershipProvider
, which first tries to authorize the user against the master instance. If a user successfully authorizes against the master instance, I would need to create or update a local user in the current instance, correct?When fetching the remote user, how am I supposed to extract data like "role" (admin, editor etc) and other settings like permissions?
Finally, if I create a new user, how to sign it in programatically?
Hi Johan Dahlström
Did you find a solution to this issue? Can you share with us?
Alex
Hi Alex,
I haven't implemented anything yet, but based on my findings I think I will do as follows:
UserService.SavedUser
As far as I know, there has to be a physical backoffice user in order to log in - that's why the sync is necessary.
Hi Johan
Sounds like a great plan.
You can create users manually during login process, if the user doesn't exist in Umbraco but is valid from external API. So basically you don't have to have all users in Umbraco.
What about user groups?
Would you create the same user groups in Umbraco instances?
Thanks,
Alex
Thanks for your feedback.
When overriding
CheckPasswordAsync
, there doesn't seem to be a way to log in new users (see https://our.umbraco.com/forum/extending-umbraco-and-using-the-api/93655-umbraco-7-user-login-backoffice-programmatically for example). Perhaps it has been fixed?Regarding user groups I'm currently only using native ones, (admin and content manager) so it's simply a matter of assigning them accordingly.
is working on a reply...