Refresh Tokens with a .NET 6 Web API

Refresh Tokens with a .NET 6 Web API

Patrick God

2 года назад

46,869 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@thetruetom9104
@thetruetom9104 - 14.11.2023 19:56

the best channel for .Net Developers :)

Ответить
@imanesghiouar6480
@imanesghiouar6480 - 15.08.2023 11:12

okay, I have a question here, why in the refresh token endpoint u're generating a new refreshtoken What is the point, I mean why?
isn't it supposed that refresh tooken generate a new access token, and that's it?
Thank you for ur video and also medium articles really helpful

Ответить
@vijayakumar1591
@vijayakumar1591 - 01.08.2023 16:39

Nice 😊

Ответить
@rinkuchauhan3157
@rinkuchauhan3157 - 21.07.2023 19:20

How call Refresh Toker method

Ответить
@mrcoleman499
@mrcoleman499 - 07.07.2023 20:20

Just wanna say thank you! Love your content. You're a great teacher. Even purchased your course. <3

Ответить
@erandafernando94
@erandafernando94 - 29.06.2023 17:30

hi Patrick ! how do i revoke a token?

Ответить
@lpnjp
@lpnjp - 03.05.2023 16:18

Please use white background.

Ответить
@UzairAli001
@UzairAli001 - 24.04.2023 12:59

When requesting new Token, you are re-generating refresh token with new expiration date doesn't that mean it will never expires as long as client asking for new token? is this intended behavior?

Ответить
@jollylollipop6745
@jollylollipop6745 - 16.02.2023 18:52

Great video and thanks a lot Patrick. Just wanted to know how to implement a logout api and destroy the jwt and refresh tokens.

Ответить
@yuliazhorniak6789
@yuliazhorniak6789 - 11.02.2023 18:30

Hello!Thanks for the video!Could you also show how Logout method can be provided?

Ответить
@kdu97
@kdu97 - 28.01.2023 22:08

Thak you!!

Ответить
@rubensaraujo4386
@rubensaraujo4386 - 21.01.2023 02:38

Sencacional obrigado pelo vídeo meu amigo, me ajudou muito, tenho muitas dúvidas na implementação desses recursos.

Ответить
@muhammadnajial-khudari7109
@muhammadnajial-khudari7109 - 10.01.2023 20:58

how JWT logout !!

Ответить
@DieDona
@DieDona - 04.01.2023 20:14

Thanks for sharing Patrick!

May i ask, wouldn't it be better to send the refresh token as a json response, thinking that the receiver might not handle cookies?

Ответить
@Furki4_4
@Furki4_4 - 04.12.2022 07:29

These four JWT videos were pretty quick tutorial, thank you Patrick. now, time to deep dive and implement best practices :3

Ответить
@stalinev
@stalinev - 02.12.2022 13:55

Hi @Patrick God - I am getting error at line Request.Cookie["refreshToken"]. Error Message: "IFeatures Collection has been disposed, object Name : Collection"

Ответить
@vishoek69
@vishoek69 - 27.11.2022 21:23

The first time you authenticate you provide a username an password (or clientid and secret). And if the information provided by the user is valid, then a response contains a short-lived access token along with a long-lived refresh token gets generated.

The refresh token is not an access token it is just an identifier for the access token. Now once the access token is expired, the user can use the refresh token to obtain another short-lived access token and so on. So you don't need to provide username and password when the short-lived access token expires (e.g. after 30 minutes) each time. Only if the refresh token expires (e.g. after 24 hours) you need to provide a username and password to authenticate and get a new short-lived access token and refresh toiken.

Ответить
@daelhoser310
@daelhoser310 - 31.10.2022 19:59

nice video. One thing Should the refresh token expiration date be the same as the JWT token expiration date?

Ответить
@luisfernandodeolazabalsche3317
@luisfernandodeolazabalsche3317 - 10.09.2022 03:50

Genial muchas gracias.

Ответить
@shadmansudipto7287
@shadmansudipto7287 - 09.09.2022 05:56

This series was absolutely amazing man, thank you. I appreciated the fact that you kept things simple and not wasting time with things we already know.

Ответить
@najam66336
@najam66336 - 22.08.2022 08:52

Hi @patrik God please make a video that how we connect this all register login and refresh token with the database

Ответить
@EthanBi1981
@EthanBi1981 - 01.08.2022 05:51

If I secretly intercept the refreshToken, can I keep generating the token secretly? What is the meaning of the token?

Ответить
@SergioGarcia27
@SergioGarcia27 - 22.07.2022 08:46

Hi Patrick, can you do a video of the integration in the frontend whit this Login?

Ответить
@amirdar
@amirdar - 18.07.2022 09:13

Hi Patric,
can you please share links to the first videos in this series ?
thanks

Ответить
@Mo-ef9yt
@Mo-ef9yt - 22.06.2022 12:48

does your skillshare video contains how to make the frontend part?

Ответить
@erictenwestenend868
@erictenwestenend868 - 08.06.2022 12:54

Another great session, thanks Patrick!

Ответить
@jesperkped
@jesperkped - 05.06.2022 19:12

I have a slight challenge (okey a bit more than a "slight challenge") about how the refresh token is triggered.
I understand that when the authorization token is expired you can use the refresh token to authenticate to get a new valid (unexpired) authentication token.

But from a web client how would that look?
Ie. what happens when the web client opens a page - the authentication token fail due to expired token... what then? (I don't see any "automagic" that call the RefreshToken endpoint)

Any hints on how it work is greatly appreciated.

Ответить
@azgan123
@azgan123 - 26.05.2022 22:07

Do you have any books? I like your style but im more into reading than watching videos.

Ответить
@_MoshikoAz_
@_MoshikoAz_ - 19.05.2022 22:31

what if you have multiple roles, how would you do it in claims ?

Ответить
@argelisbrito
@argelisbrito - 17.05.2022 16:37

Hello Patrick, thank you for all the videos, I also bought your course on identity, just want to ask if you could create an example on reporting, any way you want, how do I create or use report tools on blazor, thank you 🙏🏼

Ответить
@haydarm.al-samawe9819
@haydarm.al-samawe9819 - 14.05.2022 20:25

Hi Patrick, will you Update the course in Udimy also I'm already enrolled there, you know we have complete e-commerce project there

Ответить
@MohammadKomaei
@MohammadKomaei - 13.05.2022 08:53

It is better to write refresh token in local storage and send it to the refresh-token action every time is needed. Also we should create a table for user tokens and add user tokens in it because a user can have multi tokens and user tokens table primary key is refresh token GUID.

Ответить
@richardarielcruzcespedes9455
@richardarielcruzcespedes9455 - 12.05.2022 12:20

Thanks for the JWT videos, This is the best explanation I have seen

Ответить
@taniardi6074
@taniardi6074 - 11.05.2022 04:44

Patrick, if i use authorize role how to i add or custume error message n?

Ответить
@mylesdavies9476
@mylesdavies9476 - 10.05.2022 22:21

Great stuff, thanks 👍

Ответить
@10Totti
@10Totti - 10.05.2022 18:12

Thanks, and for disable or invalidate token before expire ?

Ответить
@umargulzar2982
@umargulzar2982 - 10.05.2022 14:17

Sir , Please give me answer , Why do we use refresh token ? What are the advantages?

Ответить
@deanb4427
@deanb4427 - 10.05.2022 14:13

What are the links to the first 2 parts ? There are a few videos on this topic. Thanks.

Ответить
@pkplaypal
@pkplaypal - 10.05.2022 11:00

Why do we use refresh token what's the purpose of it

Ответить