Authentication and Authorization with Okta in .NET 6 Blazor Server

Поделиться
HTML-код
  • Опубликовано: 27 янв 2025

Комментарии • 40

  • @CodeWithJulian
    @CodeWithJulian  2 года назад

    Hey wonderful human beings! Don't forget to like this video if you found it helpful 😎 Thanks!

  • @GuildOfCalamity
    @GuildOfCalamity 2 года назад +1

    Yay, new video!

  • @Bigbacon
    @Bigbacon Год назад

    thank you for this video! Okta's example on line is .Net 3.1 and different than 6+

  • @ahmadalmasri4416
    @ahmadalmasri4416 Год назад

    impressive tutorial, thank you Julian

  • @jd_27
    @jd_27 Год назад

    Thank you very much. Really enjoyed this tutorial

  • @philipquarles4679
    @philipquarles4679 9 месяцев назад

    Very well explained and easy to follow. Thank you.

  • @bobo1793
    @bobo1793 2 года назад +1

    Hello Julian, great tutorial session! I had a few quick questions if you don't mind:
    1. How do you handle session duration/lifetime? An issue I've found is that the token might expire but the middleware doesn't do anything about it, as the session is not tied to the token in any way. UseTokenLifetime seems to do nothing for it.
    2. Do you think it might have anything to do with the order of the function calls between .AddOpenIdConnect and .AddCookie?
    3. Do you find Controller usage imperative? I've been trying to think of a more MVVM solution but can't find any where you can have a common controller for the logout common button in the header.
    Thanks a lot!

  • @abhishekjadhav9289
    @abhishekjadhav9289 Месяц назад

    Hi Julian, Excellent video. One question though, i have angular app and .Net 8 Rest API. In my case where will I implement Open Id Connect and Okta authentication logic i.e login, logout and middleware ? Will it be on Angular side or Rest API side ?

    • @EnjoylittlethingsbyPurvi21
      @EnjoylittlethingsbyPurvi21 13 дней назад

      Did you get any update?

    • @abhishekjadhav9289
      @abhishekjadhav9289 13 дней назад

      @@EnjoylittlethingsbyPurvi21 No reply from him and I did not get the time to check on other sites. Will reply if I have any..

  • @eduardrivas6964
    @eduardrivas6964 9 месяцев назад

    Curious, I haven't ever used a service that implemented Okta.
    Why are you suggesting it? I mean, is not popular, do you have any tutorial for Google OAuth?

  • @DanielTames
    @DanielTames 2 года назад

    thanks for the content man!

  • @srinivasanhariharan6489
    @srinivasanhariharan6489 3 месяца назад

    Can you provide the same example with .net8. If you feel, there is no change, then please say, no change. we will use this step to implement.

  • @dotnetdevni
    @dotnetdevni 2 года назад

    Does okta honour authoriseview etc and all and does it provide an in app ui for managing user profiles? So they can reset passwords and such

  • @mohammadNadeem-i6g
    @mohammadNadeem-i6g Год назад

    Hey Julian, How we can do the single sign on (SSO) using okta in dotnet core ,
    Thank you

  • @jayakumar2927
    @jayakumar2927 Год назад

    Good one useful. Saml also as well

  • @nezqwe4818
    @nezqwe4818 Год назад

    hi, my @attribute [Authorize] isnt working correctly on a page.
    if I go do that page, it just directly redirect me to login via okta.
    I want it to show the stuff on tag we put in app.
    How do i do this?

  • @kjhunkler
    @kjhunkler 2 года назад +1

    Thanks Julian! Great tutorial.
    I fixed the "Unknown Location" error I was getting on Okta redirect by adding 2 more lines in the oidOptions:
    oidOptions.CorrelationCookie.SameSite = SameSiteMode.Unspecified;
    oidOptions.NonceCookie.SameSite = SameSiteMode.Unspecified;
    Hope this helps anyone with the same error.

  • @priyajeth
    @priyajeth 8 месяцев назад

    The access token is null. How do I fix this?

  • @PelFox
    @PelFox 2 года назад

    Hi, I'm using an IdentityServer setup for SSO and followed these steps on how to configure the Blazor side. It works but I have some issues with the log out.
    I get logged out but redirected back to start page which logs me back in automatically. I have authorize requirement for all my pages.
    If I clear the cookies manually and refresh I get redirected and have to log in using my email/password.
    But the log out clears the cookie and then adds them directly without me having to enter my credentials, which seems odd. Any info is helpful :)

  • @majormartintibor
    @majormartintibor Год назад

    I triple checked everything, yet I get a 400 Bad Request from Okta when clicking on login.
    "Your request resulted in an error. The 'redirect_uri' parameter must be a Login redirect URI in the client app settings:"
    "Identity Provider: Unknown, Error Code: invalid_request"

    • @majormartintibor
      @majormartintibor Год назад

      Nevermind, the issue was, that in Okta I had http instead of https. Works now.

  • @FragrantVagrant69
    @FragrantVagrant69 2 года назад

    Thanks for this. Any chance of covering refresh tokens with Okta in dotnet 6?

    • @CodeWithJulian
      @CodeWithJulian  2 года назад +2

      Hi yeah refresh tokens will be covered in the next video.

    • @FragrantVagrant69
      @FragrantVagrant69 2 года назад

      @@CodeWithJulian Amazing, thank you! Trying to get refresh tokens working in Blazor Webassembly but have been struggling.

  • @comroec
    @comroec 2 года назад

    tnx bro

  • @edafeclintiduh3754
    @edafeclintiduh3754 2 года назад

    Hello Julian, Great tutorial sessions you have here. Can you create a tutorial similar to this but for Blazor WASM using OKTA in .NET 6?
    I have implemented several approaches towards this goal but it doesn't work for me. The server side solution works, but it doesn't CDN services, which is why the WASM is important for me.

    • @CodeWithJulian
      @CodeWithJulian  2 года назад

      Hi thanks for feedback! I'll add your suggestion to the backlog, thank you! In the meantime, have you tried their website/yt channel ? They have exactly what you're asking. If you google 'okta blazor wasm', their post should be the first.

    • @edafeclintiduh3754
      @edafeclintiduh3754 2 года назад +1

      @@CodeWithJulian
      Hi, Yes you are correct I tried out the solution provided by Heather Downing, but it didn’t work for me. I got redirected to the OKTA login window but my authentication wasn’t successful and I was not able to see the CLAIMS page with all the details for a successful authorization. I got this error message “There was an error trying to log you in”
      I will wait for your solution once you are able to deliver it and thanks for the shared resource.

  • @johncarruyo8716
    @johncarruyo8716 2 года назад

    I'm getting the following error after following the tutorial
    InvalidOperationException: Provide Authority, MetadataAddress, Configuration, or ConfigurationManager to OpenIdConnectOptions
    Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectOptions.Validate()