Access Token and Refresh Tokens | Build Starter Kit for Single Page Apps #3 #dartlang #flutter #apis

preview_player
Показать описание
We will implement a refresh token along with our access token to be used when issuing our a new access token after the current one expires. We will create a Token service that will generate our token pairs and also persist our refresh tokens in a Redis datastore. We will bootstrap our Redis server by creating a docker compose file, which we will communicate with using the Redis client package. We will also use redis-commander as our UI for viewing the data in our store.

=== Contents of this video ===

00:00 Intro
00:28 Add Redis and Uuid packages
01:04 Implement TokenService class
02:54 Bootstrap Redis server with Docker Compose
03:36 Connect to our Redis server
03:50 Implement createTokenPair and addRefreshToken methods
09:48 Install and use Redis Commander UI
11:04 Implement getRefreshToken and deleteRefreshToken methods
13:03 Create refresh token endpoint
16:56 Refactor solution to use .env variables
19:50 Outro

Please leave us your feedback in the comments, and let us know what you would like us to demonstrate next! You can reach out in the comments below or on Twitter using #FullstackDart #Dartlang #DartStarterKit #Flutter

Like, Subscribe and Hit the Bell 🔔 if you enjoyed this video 😍

LET'S CONNECT
---
Рекомендации по теме
Комментарии
Автор

Great! I am waiting for more contents in this series.

aadarshainfo
Автор

Nice! Will be testing this out tonight.

Canaris
Автор

Can you do a flutter supabase tutorial? Supabase is growing in popularity. You can also compare firebase and supabase if you want.

sakethparimi
Автор

great content, got you server working and even made adjustments, could this serve up my flutter app in a seperate directory? right now I put app.mount('/app/', in there but it shows up a blank page, there is javascript in the source code when i click view source inside the browser, have you had any luck serving flutter apps with shelf_router?

matthewslaton
Автор

Nice video! I'ts a pity that this redis library isn't null safe, though :(

gabrielpacheco
Автор

Wait a minute... Why should I learn to build backend apps with Dart while I can do that with NodeJS that is extremely powerful and has a huge community?!

michaelamir