Это видео недоступно.
Сожалеем об этом.

Refresh Token in Asp.Net Core with JWT

Поделиться
HTML-код
  • Опубликовано: 1 июн 2020
  • This video explains about how to use refresh token in token based authentication in asp.net core. You can find the source code in the link given below:
    github.com/upr...

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

  • @TheDibs4
    @TheDibs4 3 года назад

    Very good

  • @balajikedari9065
    @balajikedari9065 3 года назад

    Can you please tell me where to call RefreshToken Method in the code

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

      Before calling other APIs, you need to verify the expiry time mentioned in the JWT token. if it got expired then you need to invoke the refresh token end point and get a new JWT token.
      same as bearer token, refresh token also has an expiry time. so user needs to authenticate again using their credentials to get the new refresh token. usually it will be valid for 24 hours whereas bearer token can be set to 20 minutes. As he mentioned, we need to store these tokens in the database instead of Dictionary objects.
      We no need to generate new refresh tokens whenever the bearer token is expired. also If the user resets his/her current password then we need to invalidate active refresh token.
      One more small correction with respect to design, we need to move all the controller code he wrote to repository classes.