Umbraco-OpenIdConnect-Example icon indicating copy to clipboard operation
Umbraco-OpenIdConnect-Example copied to clipboard

OpenIdConnect login only for existing members?

Open inetzo opened this issue 1 year ago • 1 comments

Hi @jbreuer ,

Thank you very much for this repro, it helped me a lot! However, I still have the following problem: I want members to be able to log in via OpenIdConnect, but only if the member already exists within Umbraco. The members are created manually. I had hoped that setting autoLinkExternalAccount = false would be sufficient, but then the message appears that there is no link.

Is it possible to use the login functionality of OpenIdConnect, but only for existing members?

Best regards,

iNETZO

inetzo avatar Jan 29 '24 20:01 inetzo

Hi iNetzo,

We did/do a manual check for something similar on the OnTickedReceivedEvent. The member is then rather authenticated by the external provider, but can be denied if not exists on your local check. We use the principal to get the authenticated email address (claim) and compare this to allowed users (members in your case) using the member/user service.

Best regards,

Guido

dutchbreeze avatar Jan 30 '24 07:01 dutchbreeze