Authentication in React app using Flask Server-Sided Sessions

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone in this video i'm going to show you how you can implement server-sided session with a reactive flask application now i've got this question asked by a lot of people how to implement authentication in a react application that is using flask as its backend api now there are multiple ways to implement authentication but one of the most popular ways is to use json web tokens which a lot of people do prefer but the thing is with json web token um it's very complicated to securely store the token on the client side because if you actually store it in a cookie or in something like you know in local storage uh like those tokens can get maliciously hacked using csr for xss attacks and if you actually want to store them securely you also need to bring in refresh tokens so that you never store the um access token on the client side but instead you store a refresh token which you can use to get the access token it's pretty complicated to use and that's why i always prefer using server sided sessions they're pretty secure and they're also very easy to use now let me actually explain how server side session works so simply what you do is when you log in so after logging in the server will set a cookie on the client called session id so server sets cookie called session id now this session id will refer to the session that you have opened after logging in so every time you log in every time you get the thing authenticated on the server side you open a new authenticated session so if you have access to that session you can actually perform authenticated tasks or tasks that require authentication so the server sets a cookie call session id and that cookie will simply refer to the session that you have opened on the server side now every time you make a request so every time client makes request server receives that session id so the server will receive that session id and what this will do is that it will check on the back on the server side so what the server will do um the server will check for any session which refers to the session id so the session id that you sent to the server the server will check if there are any authenticated session which are linked to that session id so if there is a session if there is a session with that id you're authenticated so if there is a session on the backend which refers to that id well that means you have a valid session so you're an authenticated client so now you can perform authenticate tasks so that's actually like a very layman's way of explaining how server-side sessions work so let's actually get working on this so first i would actually like to create a very very simple rest api so you can actually understand how we can make something like this from scratch so i want to actually get started by installing flask and sql alchemy over here because i want to just make a simple crud api maybe just a register and login user thing i also want to use flask decrypt for hashing the passwords here so we can actually install all of this so we can do pip install dash our requirements oh before i do that i need to go to the server folder so pip install requirements.txt now this is going to install everything okay so now these um dependencies have been installed we can now get working on our flask app so i'm just gonna switch my virtual lens okay and now we're going to from last import flask and then we can also we can now create an application and here i also want to actually create a few models here so i can just do models dot pi and then here i want to actually create the db instance import sql alchemy and then db would be sql alchemy here now let's create a user um user class so this is just going to be a database table here so db.model and i want the table name to be users the id i want this to be db.column and the dv dot string and i want this to be like you know uh 32 characters long now the thing i'm going to do is i also want to create a function which is going to be get u id now the way we're going to be using id here is through using python uid so in uh so you can do from u id import uid4 so you can actually do this uid4 dot hex this is what you can return here now this will be a primary key so primary e equals to true unique equals to true default would be on this get you id here so basically we're not going to providing the user with an id so if we don't provide it the default value would be get id so it's going to run this get id function here and this is going to return a new unique id here so we have that and now we can also have an email so db.column db.string now as far as i know emails can be at most 345 characters long and unique true so i want this to be a unique email and then password can be db.column it wants to be db.text nullable false because sometimes hashes can get very big but bcrypt has a limit but i actually forgot what that is so i'm just going to leave it on text but yeah uh it's actually best to put it on the limit so that it takes less space on the database but to be frank i actually forgot how much space um the b crypt password hashes take so yeah we can have this here so we have this user model here and we can now import this so we can do from model import uh db and then user and now i can just do db.init app so we're just going to initialize the application instance and i also want to do db.create all here so before i actually do um initialize this application i want to create a config so in flask you can also use app.config but i always prefer having a separate configuration and file so i can just um do class application config and then i can just have a few stuff so i can just set sql alchemy track modifications i said to full so that it stops logging a useless message and then i also want to echo the um sql so every time you run a sql function i wanted to echo what's happening with the database and now i'm just going to set the database uri sql alchemy database uri and right now i'm just going to be using sqlite here so i'm going to be a raw string sqlite and i want this to be this uh db.sqlite so it's going to be a database in the current folder so it's going to create a file in the current folder which is fine with me and i also want to actually create a secret key here so i'm just gonna do dot end and i want to want to add python dot end here so i can just run this and yeah i want to do secret key i want to do some gibberish here but make sure you always have a strong secret key which is hard to crack so you can have that and also want to do this so at the top of our file to do from dot n import load end and i want to do load dot end here maybe i can actually do this over here in the application configuration here yeah we can have it over here i also want to have a secret key so secret key would be um import os so os dot environ secret key since the uh dot for actually creating environment variables i'm just going to use this secret key over here so we have that and now we can just run the flask app so if underscores the name equals to underscore main app.run debug equals to true great so now we can run this flask application so we can do python app.pi and it's going to say a new application found and why is that well we need to load the um configuration first so we can do ab dot config dot from object so you can do from object and we can just do from config import application config so we can just apply this here and now we can run this it's going to say no application found and why is that it's going to say db.createo okay so i actually forgot to do something here so you can do with app.app context so simply this is going to create a new app context here so now i can just do db dot create now the issue i have had here is that there's an application found so it says either work inside a view function or push an application context so i actually forgot how context work in here so we can now just run this application and it should actually create this here so right now it's it should have created those tables here but they have not been created yet so we can just work with routes now so we can do app.route slash um register so we can just have a simple registration route so def register user and i can now import session here to not session i can actually import um requests here and then we can actually have this so you can have email will be requests dot json email so i want to get it from the json data the password request dot json there's gonna be password so what i want to do here is so if user exists so if a user exists with that email so i can just do user dot query dot filter by um email equals email dot first is not none so this will basically return true if you have an existing user so if user exists on a board with um 409 so there's a conflict here so a board with a 409 great so what i can do here is i can now create new users a new user would be a user email equals email oh and before i do that i need temp or flask b crypt so from flask b crypt import b crypt we have that here and now i can just do uh this is going to be with capitals so we can just have this uh be crypt equals app uh ecrypt i'm just going to pass in the app here so we can do the hashed password we'll do bcrypt dot generate password hash and we're just going to pass it the password here now the password will be this uh will be this hashed password and now we can just do on db.section.add new user and then db.session.commit and now i want to return this new user here so i can do jsonify and i can just do um id would be the new user dot id and then the um email wait let me actually go over here the email would be new user dot email great so we have jsonify here based on file great so you can try running this now and you see this is creating a db.sqlite here automatically and you see there is this new table here so this is why i echo mysql here sql alchemy echo so that i can see what's actually happening here so i can open a postman here so postmaster software which you can use to test out your api so i can now do um localhost 5000 slash register this is going to be a post request in the body i want to have role and this is going to be json data so i can just set email to be this and then password to be one two three four five just for testing this out if you send this it should it says method not allowed and that is completely fine because i forgot to add this method so methods equal post now if i run this here it's gonna return me this um thing here so we have a we have our new user and if you take a look at this here we have this sql here it's going to select the user so basically squaring the user first and then it wants to set a user so insert into users and then passing in the data here so this is the hash password and we can have this over here so yeah we have created a new user now if we try to create a user with that same email it's going to throw an error with 409 conflict which is completely okay to be honest i would actually not prefer using 409 conflict i would rather use something like return js and then i would use um error so it's going to be a user we can say user already exists and i want to pass in the 409 status code here so we can remove a board from here so we can now just run this and it says user already exists in the headers so you see the status is 409 conflict because it was conflicting with someone which is fine um yeah we have a registered user here so now i can just do app.route and then slash login so methods equals to post as well now to do that login user and then the email and password i'm going to take from here um so if okay wait one thing okay yeah so if not user exists so simply i'm just checking if the user exists or not i'm just going to do user so if user is none i'm just going to say error unauthorized unauthorized and this is going to be 401 i think yeah this is going to be 401 unauthorized so now what i'm going to do if the user does exist i want to check if i have recrib dot check password hash i'm going to do user.password and this is going to be password so if check password hash works if this works so sorry if this doesn't work we're just going to return unauthorized okay so it's going to return unauthorized and if it actually works i want to actually return this user here so we're going to do the same thing if this works okay so we're going to have this um user dot id so this is what you're going to have here now if you want to go to login again so we can do localhost 5000 slash login in the body if we have the same things here we can have json here if you have that and if you send this request it's gonna say method not allowed because i'm using get requests here we're gonna have post here and it's it returns me this as well so which means i am logged in but the thing is even if i actually get this successful login the server has no way to keep this you know session authenticated session alive so for this we are going to use service audit sessions so this will return a cookie um to the client so we're using server-side sessions here one thing we need to do is we need to install flask session and we also need to install redis here because we'll be using um redis for our service live sessions now this is actually very very good for key pair value storage and also um sessions as well so i always prefer using redis so i can just stop the server here and then i can just pip install this now this is going to install this now one thing i would like to do is to download redis now for windows there is like an outdated version of redis but if you're on linux you can actually install redis very very easily or if you don't want to use this outdated version of redis for windows you can easily just spin up a docker container which i usually do but i've seen that a lot of people don't actually want to use docker so for demonstration purposes i'm just going to download this thread is here so yeah i'm just going to download this one here and i'm just going to install redis on windows okay so we have this that can just accept the license agreement address installation add exception to firewalls that memory limit nope and i'm just gonna install redis here great so we have installed redis here and now if you actually go to another terminal we can do redis cli and you see this here it's saying that redis is working perfectly so if you do ping it's going to say pong which means we have writers working successfully and if i do write a cli again it works so we have installed red successfully on windows so we have our flask session here uh you know like installs so let's actually create a configuration here so we can actually go to the uh flask session logs uh flask session logs sorry not flash system logs we just do like docs and yeah this is documentation you can use flask session very very easily so we can just um enable the session configure so we can do session type and that's going to be redis so we can also have session permanent so we don't want this session to be permanent so we're going to have false and then we can do session use signer so this is going to use the secret key signer on this will be true and then the session url so session redis so we have to point out to our redis client so we can do import redis and then we can do redis dot from url and this is going to be redis and then the path is going to be localhost127 to be honest we can actually do this here so you can just copy this thing here so the place where redis is running and you can just paste send here easy as that so we have that working over here now i can go to app.pi here and then i can do from last session import session so now i can just do server session it's going to be session and then this is the app so we have set up our session successfully now the thing i want to do here to actually use that is whenever the user logs in i want to set the session um i want to set put some data inside that session i want to put some data here so that we know what user this current session refers to so i want to set so i want to import this session here now by default if you don't have server-sided session here this session will be client-sided session which is very very insecure and guys don't use this but since we have enabled server sided session this session thing over here will always be stored on the server side so if you have server sided session enabled you can use this because none of this is going to be stored on the client except the session id which is fine so we're going to set the session the user id and this is going to be user.id so simply i'm just throwing some data inside the session so we have that here so we're just going to store this here session user id and now if i actually run the apps of python app.pi and now if you log in here you can check the cookie here and you see there is this new cookie called session and this cookie is just a weird looking session id here like nothing too special this is just the session id so the id which refers to the current authenticated session now let's actually implement another route here now i want this route to be the get current user route so so i'll just throw out to be add me so basically if you're logged in this will return info about the current logged in user so we can just do def get current user and then i want to have the um session sorry onto to be the user id so user id will be session.get user id now if there is an invalid session this will return none so if not user id i am just going to return this here unauthorized oops my bad okay yeah so we have the uh user here so right now we are logged in here so we can just do user is going to be user dot query dot filter by id equals to user id dot first and i just want to return this here so return jsonify uh yeah we can just do this here okay yeah so we have this set up now now if you actually go to this so you can do localhost 5000 slash add me a get request and if we send this here you see it's returning us this user and the way this is working is if we go to cookies you see this this session cookie is automatically being sent so we have the session cookie here but if we actually remove this session cookie and now if you send this request it's just going to return unauthorized but if we log in here so now now if you go here you see you have no cookies here so if you send this you're logged in you see we have a different sectionality if we go to cookies now we have the session cookie and now if you try to log in here sorry if we try to get the card user it's just going to return the current user here because we have a um session id here so this is basically how the authentication system works here so this is our complete backend okay so now we can actually get started on the front end so i'm just going to open another terminal here and then i'm just going to do um create react app now since we we this is a react tutorial i hope that you at least know the basics of react so we're going to create a react app and this we're just going to do client and i'm just going to use typescript for this now if you are a javascript user it's fine you can still do the same thing but i always prefer using typescript because they're like there's like static type checking so it's actually very um very helpful and there are a lot of ways to avoid errors so yeah that's the reason i always use typescript okay so our react application has finished setting up so we can just do ct mark now and then i can just run yarn start so it's now going to start the react application okay so the react application is running here so now we can actually go to the client side i can actually remove some stuff from the server side so go here we can actually remove some of these stuff like um app.css and then app.test.tsx svg then set up web vital setup tests yeah i don't need any of that to be honest so i can just remove some useless stuff from here like this here and then just have a div so yeah now if we go to this uh page here we have nothing here which is fine so i want to have a react router set up here we just do yarn add a react router dom so this should be adding the react router dom library so i can just create a router.tsx and then i can just use a snippet library so i usually use the es6 um react redux snippet so react um snippets here so yeah i use this extension here just like three million downloads which is amazing yeah we have this and i also want to add the types for this only do this if you're using typescript so type slash react router dom so i also want to do import uh browser router from react router dom and then i also want to do switch as well and i also want to do route great so i want to have the browser router wrapping all of this inside the router we're just going to have a switch and inside the switch i'm going to have a route and then this route will take a few props here now what props does it actually take here this takes the route props and this is going to take the location at the component so we're just going to have the location which will be um slash this is going to be the location exact i think is this the oh sorry this is not going to be locations it's going to be path exact and then i want the component to be um landing page okay so i want this to be just the landing page here so this is fine i can just do yarn start now um i want to create this landing page component here so we can just have this uh page here you can go to src you can have pages and i can just remove this app.tsx here and instead i want to have this uh landingpage.tsx now rfce so we have this react.c so you're going to have this here and then so we can just import this here great and in the router i'm just going to copy this router and put it here right so we have this here so in the landing page i'm just going to have a few stuff here so inside here i'm just going to be doing h1 and then welcome to this react application i'm just going to have this simple thing here so welcome to this react application and i don't actually want to bother you using some like styling here doing css i don't want to bother with that so yeah we're just going to have this welcome to this react application and i also want to break a line and then just say that that you are not logged in this is gonna say this here okay so it's gonna say that or we can have it like this yes that's great and then i'm just gonna have a button here so i can do log in and then another button that's going to say register we're going to have two buttons here so it's going to say login and it's going to say register i can just have some spacing between this so i need to have um class name buttons button span i'm just going to call this button spam here in the css i'm just going to do dot button span um space or sorry we can just have padding it's going to be like something like 10px or something like that we just have like what uh yeah we can just have padding here i actually want to add some space here we're just not going to do button and then it's going to do this so we're going to have some margin here about like what 5 px or something like that we can just remove this um div thing here so yeah we're going to have that here um and then we're also going to have some padding so padding is going to be 5px as well yeah i mean it doesn't look that bad for some minimal styling so we have this and i want this to redirect to the um i'll just redirect to slash login and i want this to redirect to flash register okay so we're gonna have this and i also want to have um this here so i'm just going to do route component and then i want to have a 404 component so we can just do 4 four dot tsx rfce and then oh sorry i'm just gonna do um northbound.tsx thanks to northbound i messed up the variable naming convention thing that's going to be a reaction.fc and then we're just going to say h1 or for not bound so we're going to have this not fan page fine and if we type something like this here it's going to say four if we're not found great so we have this and now we can actually go to the um landing page here so we can actually go to the login page but it's now it's going to say four for not found because we haven't added a login route so you can now create a login page here so we can do login page.tsx and then here it's just gonna be a um react.fc alice type everything so yeah so we have this login page here i want to add this to the router so we can just do um route then path would be slash login exact and then the component would be this login page so we can just import this here great so you have this login page here which doesn't actually include anything yet so we're gonna have a few things here first i want to create two state variables so we can just have a few states and these two state variables are going to be the um const email set email it's going to be use state and this is going to be a string it's going to be a string which will be we're just going to have null here yeah we're just gonna have null here so we can just do string or no and i have these two things here so and this is going to be the password and then i'm gonna have set password okay yeah so we have these two variables here and here i want to have this h1 here it's going to be log into your account or let's just have the this here log into your account and then we're gonna have this form here which will not have an action but we're gonna have an input here input type text and then i want to have this value here the value will be email and then on change on change i want to have this um set email would be e dot sorry on this to be like this e set email dot target dot value and this will also be uh sure yeah i want this to be a string i think yeah it's going to be a string uh yeah we need to also set that as well if that's the case because it's going to be a drag to actually check that out okay so we're going to have this um we have this input field here i'm gonna have a label here so label flash label email and i want to add some spacing here we have that i'm going to put this in a div for a better organization just have a password here and i want this to be a set password or a password here and this will be a password input okay so we have this here we can now just enter an email you can also enter a password here so one thing i want to actually do here is i'm going to take the input so input font size 18 px because right now this is very very small for my eyes label one size 20 px or something like that yeah i mean this does look fine so we can just do um i'm gonna do margin left 5px just move it a bit over here great okay so what i'm gonna do is i have my email here and then i can also have some weird password here okay so great we have all of this set up here so now what i want to do here is when i hit this submit button here so i want to have a button and i want to have a submit button here and on click so on click i want to run the uh run the login user now this is going to be a function that i'm going to write right now so it's going to take the event but i really don't want to worry about the event here so what will this actually do here it's gonna have a you know what i'm not gonna actually do both of doing that because i don't want to worry about the types here but yeah i can just do log in user here like this great and i want to do console.log email password so you can have this here now if i open up the console here if i type in my email and then if i type this here it's gonna say this but i want to actually do button type button yeah so i actually want to do this here so the by default any button in the uh form would be a uh it would be a submit button so we're just gonna have this here and what i want to do is i want to make an api request with this so let's actually install axios so ax uh so you can do yarn at axios and axios is like a library that i really like to use with react so we can just do on https i don't want to do import axios from axios and then and then i want to export default and then axios dot uh http client but what was that actually wait one second so axios.create and then i want to be uh use with credentials i want this to be true so that it sends all of the cookies here so yeah i'm gonna have that and i also want to i want to import this import http client from http client great we're gonna have this and i also want to run the react application over here i don't know why it opens firefox every time i think i've set it as my default browser okay so uh we have this now what i want to do is i want to make an http request to the api so our api is running on localhost for 5000 so what i'm going to do is understand async function and i want to do const response it's going to be http 9 dot um host i don't want this to be localhost 5000 login and the data on this to be a uh email or something like uh you know email password there's gonna have this and then constant.log press.data yeah oh we need to await this first year my bad so we're just gonna do that and if we try to put the email here and then the password if we submit this it's going to say that has been blocked by the course policy now the way we solve that is we have to go to our flask server here and we need to enable course so we can go here and then we can do uh we can go to requirements.txt and then we can do blast course and i can do pip install dash our requirements.txt there's an install flask course here and then we can do something like um from last course info course and then we have this course is going to be app and now if you want the server here okay we got this working over here and now if you submit this it's still going to say has been uh by the first pulse it must be true and why is that it should be working completely fine here um as far as on it shouldn't have any issues here if i actually go here still giving this issue here and why is that if you go to network here you go to this request it's not returning any data here so the response to our response is not replying with any headers oh yeah we need to shoot an input cross origin so we need to do this um at boss origin we can have this here than this that this here now we should be able to do that yeah so if we actually take a look at the console right now uh wait one second so if we refresh this and it still says from this origin hasn't blocked by close false response to once must be true when request mode is financial oh yeah wait i forgot i need to enable allow credentials so we can just do allow credentials i think so there are a few query parameters here we want to enable credentials so for enabling credentials here into supports credentials is going to be true this is the thing we didn't supply here so we can just remove this cross origin thing here and go to react and you see this this is now returning us this data here and if you go to that network tab here you see in the headers it's returning a set cookie here when we go to cookies you see there is this response cookie which is setting this session here so we have this session cookie here which is awesome so we can now go to our um homepage here and what i'm gonna do is here so we have our login page which is working perfectly so i want this to be redirecting to the um if rest dot status equals to 200 oh i forgot this is javascript not python yeah my bad i don't i want to just do dot window.location.h but what if we enter a wrong password here if you go to login page if we enter some weird looking thing here and if you enter a useless password it's just going to say 401 unauthorized so we can do this lf uh else if rest.status equals 2401 console.log uh invalid credentials i just want to try this out so if you send this here um it should say invalid credentials here so we have this here access.post now i want to actually do this i have a try here so i want to have try um and then i want to have a patch and here on a console.log the e um thing here you're going to console the exception here and it says the request has failed with this here okay so one thing we can do here to solve this i've actually figured it out is we can actually take this error here and then we can just do um so to get the response here or the status code error dot response dot status we can have error dot response dot status here so we can do if error dot response dot status is equal to 401 we're just gonna alert with invalid credentials so we can just do that so if we submit this and we have like invalid credentials we're just gonna alert this here but if you have proper credentials here so we have a proper password we're gonna have this now what i want to do here is i want to do window.h uh location.href and i want this to redirect to the homepage so if you submit this and if it works it's gonna return us to the home page now what i want to do here on the home page is i want to actually try to get the current user's information so i want to have a um use state and a use effect here so i want to have the const user set user and then use state and i also want to create a user type here so we can just do types of ts and we can do export const user and that the id would be a string uh oh yeah sorry we had to have export interface user and then we have the email which is a string as well we have that here so we have user here and then we can import oh sorry we can actually import this from types and we can just do null yeah we can actually import this here and i also want to have this use effect here so use effect uh and then we can actually have this and i want to create an async lambda function here so you can create this here um inside here so we can just do uh http client would get and then we can do slash localhost 5000 slash add me and then i want the const rest to be await here so we're gonna have that and we are going to the duom set user would be resp dot data if this is successful but if there is an error here so we can just do try and then we can also catch the exception we can just console.log well not authenticated we can do that here and what we can do here is you can have a ternary here so we can just do um user not equal to null so we can actually return this here or we can return this and i also want it to be h1 so i want this to be in a div here the div uh slash div yes so we're gonna have this here so we can just say locked in simply what i'm doing is here is that if the user is not equal to no so if the user is logged in we're just going to say logged in or if they're not logged in we're just going to do this so you see here over here the user's logged in and i forgot to fix this here in the use effect we need to set this dependency array here or else your thing is gonna get spammed with requests you see here so yeah if you refresh this you see it's gonna say logged in now that's basically how this works so if we uh we can actually put some stuff here logged in uh we can just say something like h2 logged in here so it's gonna be h2 and we can have this email here so we can just do email uh we can just have a h3 here this is gonna say email and then it's gonna have user dot email i want this to be a div here so a div and then the password sorry not password i'm just going to have the id and the user.id so we have this here so we are now currently logged in i also want to have a look out thing so we can just do something like um i have a button here which is going to log out log us out so it wants to log out and create a logout wrap suit so yeah we have this over here and i also want to actually create a registration route so right now our login route is working fine so let's actually create a logout so we can just do logout page.tsx or maybe instead of creating a component i want to just have this logout uh a function that loads you up so on click uh you can just do logout user yeah this this might work so we can do console.user async and we can actually do something like this so we can do http client.post so we can actually do that um uh so you can do const resp it's going to be logging you out so we can do logout and then we're just gonna window.location.hr so simply we're just going to refresh the page we're going to just do window dot um refresh is that a method here you can actually just do this here yeah that's going to be fine so we can do that but right now in our app.com we need to create a new route for this so we can just do um app.route slash logout and then the methods it's going to be post and then logout user i want to do session.pop user id and then we're just going to return 200. that's simply what you're going to do here and did i mess something up here yep i did mess something up right okay so yeah this works now um we can now click log out and it says block by this here is there an issue here the function is oh yeah so this is not actually a course issue this is more like a uh i just want to return the status 200 code here so you can do log out and boom it says you're not logged in so if we can go to login here i can just type the email i can type this and it says i'm logged in so we're now logged in here and you see it's making um sql queries here which is great and i can log out now let's actually create a registration route okay so we can actually create a registration route here and in the server-sided um thing here i also want to set the session id because in most like popular website you actually get logged in once you register so i want to actually do that so we can do a new user dot id here now we can actually copy this login page here i want to have a register page.tsx i can just do a register page same thing here great so we can have this and then we can do register user i want to do this so we can do register and i can do create an account i'm going to do register user okay boom so we have that and now we can go to the router here so you can go to router we can just register you can do register page great i can register here create an account i can just make another email so i can just say bob at bob.bob so it's a really really nice email i can just do bob as the password here and click submit and now it's going to login us redirect us and here is us logged in so it says logged in this is my this is bob's user id and this is the email bob at bob.bob and now if you log out it's going to say you know logged in um i can also log in with bob's email so bob yeah it's just the password is just bob so you can now submit this and boom it says we are now logged in as bob here so yeah that is basically how you make a react application that authenticates with flask through server-side session so that's it for this video um if this video helped you out please consider subscribing to the channel and like this video um i really put a lot of effort into my content and i would appreciate it if you guys subscribe so anyways have a good one guys peace out
Info
Channel: DevGuyAhnaf
Views: 1,078
Rating: undefined out of 5
Keywords: python, flask, react, coder's system, devguyahnaf, ahnaf zamil, authentication, flask session, flask react, flask react authentication, react authentication, session authentication, react session auth
Id: sBw0O5YTT4Q
Channel Id: undefined
Length: 54min 12sec (3252 seconds)
Published: Mon Oct 04 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.