User Authentication in Flask App using JWT [ JSON Web Token ]

  Рет қаралды 58,380

Bek Brace

Bek Brace

Күн бұрын

Пікірлер: 57
@robmartin7873
@robmartin7873 2 жыл бұрын
Thank you for explaining this. Your tutorial is exactly the bare bones explanation that I needed. Please keep up the great work.
@BekBrace
@BekBrace 2 жыл бұрын
Thanks Rob, appreciate that 🙏
@robmartin7873
@robmartin7873 2 жыл бұрын
@@BekBrace Do you have the time to make a follow up video to this where you do something on the server side with the JWT token? Maybe have different pages that are accessible for different user tokens?
@erickhualla8092
@erickhualla8092 3 жыл бұрын
Such a good explanation! I'll try this with my API
@leonkennedy6726
@leonkennedy6726 3 жыл бұрын
Thanks man for the clear explanation
@eduardogil1775
@eduardogil1775 3 жыл бұрын
Excellent tutorial, it cannot be explained more clearly. Thanks for sharing! 😎👍🏼
@BekBrace
@BekBrace 3 жыл бұрын
Great 👍 Thanks Eduardo
@uuuuuhhlettuce3909
@uuuuuhhlettuce3909 2 жыл бұрын
The goal of jwts is to work stateless. By using sessions in your program, you're not moving away from the "traditional approach". What you're doing is just Server-side sessions...with extra steps....
@BekBrace
@BekBrace 2 жыл бұрын
Bravo 👏 Great comment 🤣
@yukinorhiko7388
@yukinorhiko7388 3 жыл бұрын
Great job
@dipnarayansen4751
@dipnarayansen4751 Жыл бұрын
Thanks a lot for this video. Cleared a lot of doubts. really greatfull....
@BekBrace
@BekBrace Жыл бұрын
Thanks a lot for your kind comment my friend
@lakshman587
@lakshman587 2 жыл бұрын
That was very Awesome explanation!! Thanks alot for the video!
@BekBrace
@BekBrace 2 жыл бұрын
Thank you. Much appreciated 👍
@aymenalitaleb9658
@aymenalitaleb9658 Жыл бұрын
Very instructive, thank you man !
@BekBrace
@BekBrace Жыл бұрын
Thank you for watching Aymen 🙏🙂
@frenches1995
@frenches1995 Жыл бұрын
Hey this might be a beginner question: Don't you need to have some sort of a database as well to store their hashed password and the username and stuff...
@BekBrace
@BekBrace Жыл бұрын
That's a great question and the answer is yes, a DBMS would be required for data persistence, however my focus in this tutorial was only to user auth using JWTs
@frenches1995
@frenches1995 Жыл бұрын
@@BekBrace I worked on my personal project (where I'm trying to implement jwt in it) and to better understand I worked with your provided github code in the video description. And I'd just like to inform you that it didn't fully run but I managed to fix it with the help of chatGPT!
@liloflorida752
@liloflorida752 3 жыл бұрын
Useful tutorial, thank you! Does it work with aything?
@BekBrace
@BekBrace 3 жыл бұрын
In general yes it does
@juancalvera378
@juancalvera378 3 жыл бұрын
Thanks for the tutorial. What happens in the end with the /public and /auth routes?
@juancalvera378
@juancalvera378 3 жыл бұрын
btw, I'm getting an error at the request/args.get('token')
@BekBrace
@BekBrace 3 жыл бұрын
I did not get the end quite right for the mass, should be authenticated with the token -
@UttamSingh-ei3kv
@UttamSingh-ei3kv 2 жыл бұрын
AttributeError: str object has no attribute decode
@UttamSingh-ei3kv
@UttamSingh-ei3kv 2 жыл бұрын
Guys reply
@dzbro1194
@dzbro1194 Жыл бұрын
@@UttamSingh-ei3kv remove.decode return jsonify({'token': token})
@carlosmunozdelabarra7147
@carlosmunozdelabarra7147 2 ай бұрын
@@dzbro1194 🥇
@sejalrawat19
@sejalrawat19 3 жыл бұрын
sir please give solution for logout i am unable to find solution for logout using jwt in python
@BekBrace
@BekBrace 3 жыл бұрын
What is the error you’re getting ?
@ananduap667
@ananduap667 2 жыл бұрын
AssertionError: expected view func if endpoint is not provided. I am getting this error. Can someone help?
@BekBrace
@BekBrace 2 жыл бұрын
Is the endpoint well set in your code ?
@cosmic_voyager_
@cosmic_voyager_ 3 жыл бұрын
What about refresh token ?
@BekBrace
@BekBrace 3 жыл бұрын
what about it
@tahirkamal1878
@tahirkamal1878 2 жыл бұрын
Thank's for the explanation i have an issue, i log in to an interface, but after several logins, which require google authentication, the interface doesn't require a user & password, only click on google account and login, and i want to access that interface through python to get some data, now i can get my hands on the token from the inspect element => Network, but how can i use it to login from the terminal ?
@BekBrace
@BekBrace 2 жыл бұрын
Thank you 🙏 I’ll look into it and will be back to you when possible
@vuhuy8952
@vuhuy8952 Жыл бұрын
Hm. After login and response client with JWT token . How to make other request from client site use that token , where do you save it in client side ? And also session class look suspicious some how....
@BekBrace
@BekBrace Жыл бұрын
Suspecious?
@vuhuy8952
@vuhuy8952 Жыл бұрын
@@BekBrace yeah , keep session conflict with jwt purpose
@ntwaliandy3569
@ntwaliandy3569 2 жыл бұрын
this is soo nice!, u gat 5/5 from me .......
@BekBrace
@BekBrace 2 жыл бұрын
Thank you!
@TusharBhut-mk6mn
@TusharBhut-mk6mn Жыл бұрын
Can you make video on individual authentication for user and admin, where user authorized can use only [GET] method, while admin authorized can use [crud] methods.
@BekBrace
@BekBrace Жыл бұрын
Yes, I will
@asilbalaban
@asilbalaban 2 жыл бұрын
Token work even if already expired is it normal?
@BekBrace
@BekBrace 2 жыл бұрын
No, shouldn't be this way - check again your code
@asilbalaban
@asilbalaban 2 жыл бұрын
I fix the issue, token expire should be defined with ‘exp’ keyword.
@srvazkez
@srvazkez 2 жыл бұрын
Hi bro really amazing tutorial. So how we can do a refresh token bro?
@robmartin7873
@robmartin7873 2 жыл бұрын
The token should refresh each time you hit the /login route. I have the secret key autogenerated on api startup which works for me because my tokens are only good for 15min. I'm not sure if that was the question you were asking.
@srvazkez
@srvazkez 2 жыл бұрын
@@robmartin7873 it's nice idea but I don't understand how implement
@shashiranjan7451
@shashiranjan7451 3 жыл бұрын
thanks
@alexbalak7558
@alexbalak7558 2 жыл бұрын
You did not show how to inject your token to get verified. And your login page don't check the token. The beginning was good but the end of the video is too quick. You don't show how to inculde the token in the headers. You don't show how to store the token in the cilent browser. Half tutorial....
@BekBrace
@BekBrace 2 жыл бұрын
yes i agree, i'm not happy with this one. "Half tutorial...." - that's even generous, tbh thanks for your honesty, Alex
@alexbalak7558
@alexbalak7558 2 жыл бұрын
@@BekBrace I was to ruff. It is a good tutorial. But you should show how to put the JWT in the headers of your requests. But you must use PostMan or something like that.
@andreycastro3444
@andreycastro3444 10 ай бұрын
@@alexbalak7558 how to include the token in postman? its always returning "Token is required"
@PrAsHaNtHdUke1093
@PrAsHaNtHdUke1093 Ай бұрын
please tell how to pass this jwt token in web browser i did according you mentioned in source code for passing jwt token for /auth url, but its not working...please suggests any solutions for me...🙏🙏
@m.kavyasri6458
@m.kavyasri6458 2 жыл бұрын
excellent tutorial, but am getting this error "jinja2.exceptions.TemplateNotFound: login.html" pls help me
@BekBrace
@BekBrace 2 жыл бұрын
Check out the source code in the link below and compare your code
What Is JWT and Why Should You Use JWT
14:53
Web Dev Simplified
Рет қаралды 1,2 МЛН
Authenticating a Flask API Using JSON Web Tokens
20:33
Pretty Printed
Рет қаралды 176 М.
А я думаю что за звук такой знакомый? 😂😂😂
00:15
Денис Кукояка
Рет қаралды 7 МЛН
Как Я Брата ОБМАНУЛ (смешное видео, прикол, юмор, поржать)
00:59
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 17 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 53 МЛН
Custom Authentication (JSON Web Tokens)
13:03
FlutterFlow
Рет қаралды 21 М.
Difference between cookies, session and tokens
11:53
Valentin Despa
Рет қаралды 663 М.
Session Vs JWT: The Differences You May Not Know!
7:00
ByteByteGo
Рет қаралды 281 М.
User Authentication - Flask Tutorial Series #8
28:14
NeuralNine
Рет қаралды 11 М.
Create A Python API in 12 Minutes
12:05
Tech With Tim
Рет қаралды 704 М.
JWT Authentication Tutorial - Node.js
27:36
Web Dev Simplified
Рет қаралды 1 МЛН
How to Create JSON Web Tokens (JWTs) in Python
12:16
OktaDev
Рет қаралды 15 М.
А я думаю что за звук такой знакомый? 😂😂😂
00:15
Денис Кукояка
Рет қаралды 7 МЛН