Multiple JWTs in .NET: How to Implement Multi-Token Authentication

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

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

  • @MilanJovanovicTech
    @MilanJovanovicTech  2 месяца назад +2

    Want to master Clean Architecture? Go here: bit.ly/3PupkOJ
    Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt
    Join a community of 1000+ .NET developers: www.patreon.com/milanjovanovic

  •  21 день назад +2

    Díky!

  • @mreshboboyev
    @mreshboboyev 2 месяца назад +3

    This is absolutely useful , thank you Milan!

    • @MilanJovanovicTech
      @MilanJovanovicTech  2 месяца назад +1

      @@mreshboboyev Glad you enjoyed it. This has been asked many times in the channel, so figured I'd cover it.

  • @thiagomatu
    @thiagomatu 2 месяца назад

    Nice, I work on an application that supports multiple authentication providers, but this your code is so much clean and easier to understand, thanks for sharing this Milan!

  • @ruekkart
    @ruekkart 2 месяца назад

    Awesome! I was thinking about this for a multitenant app where each tenant can define its own auth provider, and this seems pretty helpful for that.

  • @AbdulHaseeb-vc5yv
    @AbdulHaseeb-vc5yv 2 месяца назад

    Exactly what I needed. Thanks!

  • @kabal911
    @kabal911 2 месяца назад

    Nice.
    I coincidentally did a pretty similar thing yesterday, where I wanted to support Cookie auth OR JWT auth.
    Took a bit of time to figure out the existence of AuthorizationBuiler and the DefaultPolicy

  • @johncerpa3782
    @johncerpa3782 2 месяца назад

    Great video!

  • @cesarmauricioguerrerobatre591
    @cesarmauricioguerrerobatre591 2 месяца назад

    Amazing, it was a masterful explanation, what happens when I have several clients coming from keycloak and I need a certain client to access a certain number of enpoints, how do I do this?

  • @timur2887
    @timur2887 2 месяца назад

    Thank you!

  • @yaelsleman660
    @yaelsleman660 2 месяца назад

    Mr please.. I need to know what is you opinion about ABP framework and it is important to learn it?

  • @eduardoyupanqui
    @eduardoyupanqui 2 месяца назад

    Wow, its no necessary add policyscheme to select the scheme to validate?

  • @nenzax2701
    @nenzax2701 2 месяца назад

    Great Video, quick question, how do we tie a particular controller method to a specific jwttoken, ex: api/getusers should use keycloak, api/getadmins should use supabse

    • @MilanJovanovicTech
      @MilanJovanovicTech  2 месяца назад +2

      Authorize[AuthenticationSchemes: "custom_scheme_name"]
      I may have missed the exact syntax, but you can specify the scheme you want to use for a given controller/endpoint

    • @vichustephen4475
      @vichustephen4475 2 месяца назад

      @@MilanJovanovicTech But if I put both schemes , the middleware will make public cert verification requests to both endpoints . Need to use AddPolicyScheme with forward selector

  • @michxkowal4282
    @michxkowal4282 2 месяца назад

    Hi, do you know how to change the secret key while the API is running? I would like to be able to externally change secret in certain situations.

  • @thomasvlima
    @thomasvlima 2 месяца назад +1

    And a multitenant API where each tenant has its own user pool?

    • @MilanJovanovicTech
      @MilanJovanovicTech  2 месяца назад

      But same auth provider?

    • @thomasvlima
      @thomasvlima 2 месяца назад

      @MilanJovanovicTech yes. For example, using cognito, each tenant has its own user pool. And each user pool can have its own AD integration

  • @binoypatel09
    @binoypatel09 2 месяца назад

    Is Microsoft Entra ID work same way?

    • @MilanJovanovicTech
      @MilanJovanovicTech  2 месяца назад

      In what way do you mean?

    • @binoypatel09
      @binoypatel09 2 месяца назад +1

      Let say I have a server app with the multiple different client apps, some apps use built-in authentication in the server app and some uses Microsoft Entra ID withe the same server app, so how am I going to accomplish this?

  • @mr-black_rock321
    @mr-black_rock321 Месяц назад

    How to secure jwt access token in SPA (Single Page Application)

  • @codenetw
    @codenetw 2 месяца назад

    Thx!