Flutter Bearer Token | Http Request Send Bearer Token

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone salaam welcome well here we'll take  a look what is called bearer token first see what   is bearer bearer means carrier and token means  secret code so bearer token means carrier of the   secret code now a token may look like this pretty  long some random letters and things like that so better token means carrier of the token and who  is the carrier in general your http get request   or http post request now you send bearer token  with the keyword bearer and the token together   in a string format in the headers of  http get request and http post request   so here token in general is generated by  the server first time when you sign up   if you have a new user and user wants to register   and for that registration using the password and  username for those two credentials in the backend   the backend server and rest api will generate  token and that token is called bearer token   now that's saved in the server so next time  if you have a route or a page that you want to   show to the user only certain verification is  done or whether the user has registered or not   you use bearer token to do the authentication  to know if the there is a user like this and   if there is a user you want to go to the user  space not just based on username and password   you also want to verify it using the token so  now here this is the page where i want to go   and see i want to see my profile so for this one  this profile page is protected using the token   so if there is a user for this page so the  server will try to find the user and if it can   find it can also find a token for that  user so server will send me status quo 200   with the bearer token together so here i want to  log in so here i'll log in so here i'm sending   my phone number and password and against this  phone number and password in my server i should   have a token unique token for this phone number  and password so once i call this sign in method   so it will talk to the server and if the  authentication is done it will send me the   token okay and this tells me that there is a valid  user in the server or in my database and that user   can access this profile page and as i just  logged in that token has been sent to me   well now of course sending the token from the  server is not the job of the app this is the   job of the server side but anyway so since that  token has been sent to me i can save it somewhere   in my app and then next time i want to make some  requests or some pages that should be protected   using this token this token i can use to do  the conditional check whether certain user   has access to certain pages or not of course  this connects both front end and back end   and anyway so if you have to send a token you'd  send it through headers just like this thank you
Info
Channel: dbestech
Views: 21,900
Rating: undefined out of 5
Keywords: flutter bearer token, bearer token, bearer token authentication, flutter tutorial, flutter, dart, send bearer token server
Id: Gx64a8rtwvU
Channel Id: undefined
Length: 3min 51sec (231 seconds)
Published: Fri Apr 22 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.