Authentication in React app using Flask Server-Sided Sessions

preview_player
Показать описание
Authentication in React app using Flask Server-Sided Sessions

In this video, I show you how you can authenticate your React application using Flask server-sided sessions. This is a very easy way to authenticate clients using HTTPOnly cookies, and the session data is stored on the server-side, while the client only receives a corresponding session ID.

Links
====

Software Used
============
Recording: OBS Studio
Thumbnail: Adobe Photoshop
Editing: Sony Vegas Pro

Hope you enjoy this video, I am open to feedback.
Рекомендации по теме
Комментарии
Автор

I'm making a internal system for my company, using flask and react, and I have no idea how auth works (until now, I was storing a token in client-side xD). Appreciate your content! :)

vitvitvitvitvitvitvitvit
Автор

Rarely comment but had to say great job. I'm a CS student trying to redo a group project originally built in flask to a flask API and React front end. Flask is so easy handling current_user with jinja, but you literally answered all my questions in a single video. Now I just need to get to work. Great job.

IamFrancoisDillinger
Автор

That helped a lot. I was working on something like that and missing a few things here and there while implementing the sessions. You just earned a sub dude <3

Whataluckyguy
Автор

Bro, u are a legend! You explained everything so well i understood flask and implemented it for my vue application. Thank u so much!

begforsalvation
Автор

Thanks man! This helped me a lot! Saw some less efficient/safe ways to do it on Youtube and I knew I had to look further. This looks like the best way to do authentication. Very well explained! Thanks!

Pouckimon
Автор

Great, just what I was looking for, thanks bro

JAVIEREDUARDODIAZALFARO
Автор

I was just working on my end of phase project... got stuck in authentication part... this tutorial made me a great help. Thanks man

vitamaxoduol
Автор

dude, you have done a great great great work, thanks

wilchardruin
Автор

Thank you so much, the video is amazing, everything is explained well, the pace is great, this is exactly what i was looking for!

ИгорьКлещёв-нэ
Автор

Learnt so fucking much from this video thanks, I am used to authentication in Nodejs/Express, its nice to see it how to do it in Python to, pretty much the same thing. Also so happy you used Typescript!

eshw
Автор

I get a TypeError: cannot use a string pattern on a bytes-like object when I run your code (it happens after login or register, when i should receive the cookie)

KOOBA
Автор

this is amazing! Thank you for your help.

AudreyVasher
Автор

Thanks for the tutorial! Side note what VS theme is that? It looks really good

tainebambrough
Автор

When I log in the cookie is being set, but when I log out the server responds with internal server error, and gives KeyError: user_id, basically it is not able to find the cookie although it works fine with postman but when I try this using browser this error occurs

yashtokekar
Автор

thank you awesome clear and concise video!

captainwalter
Автор

Gracias amigo, buen video 😌 saludo desde Colombia desde hoy soy fiel seguidor 👏

kevincueva
Автор

If the only scopes you are asking for is “know what servers you are in” is server sided sessions really needed? If someone uses xss on your site, thats more of a concern if the token being stored doesnt have sensitive scopes such as join servers, access email… etc

In terms of discord oauth

bestofsplitgate
Автор

Thanks. great tutorial. I have one question. Since cookie is visible on the browser does it mean anyone that has that cookie can log in as the user? Or the library checking something else to prevent it?

Deccoyi
Автор

What was the reason to install redis to not use it at the end? Also getting the CORS errors, when running the code on the other machine.

rdm_
Автор

Thanks for the tutorial!

If multiple people are logged into the website, how does session know which user to pop if they all have the same key "user_id"?

Dholi