jbreuer / Umbraco-OpenIdConnect-Example

An example to show how Umbraco and OpenIdConnect work together
MIT License
29 stars 9 forks source link

SSO using auth0 and Umbraco members #5

Open shearer3000 opened 11 months ago

shearer3000 commented 11 months ago

hi Jeroen

firstly, thanks for this sample project.

does this example require membership records already exist in umbraco, or can it work exclusively with auth0 as a SSO provider?

I was curious why the extra claims you set up in the OnTokenValidated event aren't in the OnAutoLinking callback instead as that seems like the more logical place according to the Umbraco docs (however, i can't get that event to fire, not sure if that's an Umbraco 10 bug or not)

thanks in advance for any feedback/insight you might be able to provide here Andrew

jbreuer commented 10 months ago

Hi Andrew,

The default example will create a member in Umbraco the first time you login. That's when the OnAutoLinking is fired. The next time you login with the same member that event won't be fired. That's why I use the OnTokenValidated because that event is hit on each login.

I wrote a blog where a member doesn't need to exist in Umbraco, but it's experimental: https://www.jeroenbreuer.nl/blog/virtual-members-in-umbraco/

Jeroen