GithubHelp home page GithubHelp logo

jbreuer / umbraco-openidconnect-example Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 9.0 10.5 MB

An example to show how Umbraco and OpenIdConnect work together

License: MIT License

C# 1.76% HTML 4.35% JavaScript 85.84% CSS 8.06%

umbraco-openidconnect-example's People

Contributors

jbreuer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

umbraco-openidconnect-example's Issues

Users Example (Sign Out)

@jbreuer, thank you for sharing this code; it has been most helpful.

If you have time, I'm wondering how I might repurpose your code (OnRedirectToIdentityProviderForSignOut) for backoffice users. I have an OpenIdConnect properly configured for sign-in, auto-linking, etc. The last piece of the puzzle is how to trigger this code upon signing out of the backoffice.

I appreciate your help,

Still logged in after signing out from another system

I believe this is a flaw in the example, but I would love to be corrected. I'd love even more if you have any idea how to resolve it.

Logging out using this code works fine because we expire our auth cookie. However I think there is a problem with the following user journey.

  1. Login to our app
  2. Go to another app with the same SSO
  3. Go out on that other app
  4. Return to our app

In this scenario we have logged out via SSO, but we are still logged in on our app.

OpenIdConnect login only for existing members?

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

/signin-oidc - OpenIdConnectAuthenticationHandler: message.State is null or empty.

Hey first off this code sample is fantastic, definitely gets me up and running.

I noticed an oddity - when I tried to implement an OpenIdConnect provider (before reading umbraco documentation and using member auto-linking), I hit a snag where my AuthenticationMiddleware and the default callback path of /signin-oidc error.

I noticed this project also exhibits the same error where navigation to /signin-oidc has an exception reproudicble by just running this project.

Do you know more about why this may be or an adjustment that can be made during AddOpenIdConnect? Using IUmbracoBuilder.AddMemberExternalLogins was just slightly different enough from a non-umbraco sample I had working, so this threw me off for some time until I found this project.

Exception: OpenIdConnectAuthenticationHandler: message.State is null or empty.

Unknown location
Exception: An error was encountered while handling the remote login.

Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler.HandleRequestAsync()

Exception: An error was encountered while handling the remote login.

Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler<TOptions>.HandleRequestAsync()
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in MiniProfilerMiddleware.cs
Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Umbraco.Cms.Web.Common.Middleware.PreviewAuthenticationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Umbraco.Cms.Web.Common.Middleware.UmbracoRequestLoggingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, bool retry)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

SSO using auth0 and Umbraco members

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.