JWT Authentication in Go (Gin/Gorm)

  Рет қаралды 66,748

Coding with Robby

Coding with Robby

Күн бұрын

In this video we'll create a JWT (json web token) authentication system in Go lang using Gorm, Gin, bcrypt, and jwt-go.
0:00 - Install Packages
2:50 - Hello World
3:48 - Dotenv setup
5:04 - Setup Gin
5:32 - Connecting to a database
8:18 - The user model
11:08 - Signup
17:38 - Login
26:58 - Auth Middleware
GORM - gorm.io/
Gin - gin-gonic.com/
Dotenv - github.com/joho/godotenv
Bcrypt - pkg.go.dev/golang.org/x/crypt...
JWT-Go - github.com/golang-jwt/jwt
Compile Daemon - github.com/githubnemo/Compile...
Like and subscribe!

Пікірлер: 136
@YidiEnterprises
@YidiEnterprises 4 күн бұрын
I'm an experienced dev. New to Go. I can't stand most coding tutorial. I feel like most youtubers make the content seem inaccessible, like you need their help to learn it and there is no better way and then they pass themselves off as experts on it all. I recently discovered your channel while exploring go concepts and you are the exception. You make it very clear where everyone can go to learn materials on their own if they want to branch off from your tutorial. You show the documentation and your process of learning in a way that lets other people learn how to learn rather than rely on you covering exactly what they need. You are not afraid to demonstrate concepts in a way that may make people think you are learning it for the first time and I love that
@terrytas13
@terrytas13 2 жыл бұрын
Your videos are awesome! Straight forward and super helpful. Keep it up.
@toheebojuolape3736
@toheebojuolape3736 Жыл бұрын
Amazing tutorial. Love the way you arrange your files and structure your code. Neat!
@fabtjar
@fabtjar 2 жыл бұрын
I like how you are going through all the same setup like you did with your other Go video. Good way for me to remember the steps. I hate tutorials when they want you to watch their 20 setup videos first. Cheers.
@Dzikrullah_999
@Dzikrullah_999 Жыл бұрын
Clear, concise and straightforward. Thanks man!
@ahamedlincon4980
@ahamedlincon4980 Ай бұрын
I prefer more straightforward, clean and structured videos like these.. great work man! Just subbed! 👾
@nasxmo
@nasxmo 2 жыл бұрын
Your videos on Go really good and clean. Keep creating more videos on Go!
@the0nerens
@the0nerens 8 ай бұрын
Nice video, really great for an developer starting out with go backend-services! Great you also covered other basic topics next to just JWT!
@QuangMinh-gm3xb
@QuangMinh-gm3xb Жыл бұрын
your middleware usage is much more clean readable than others imo, thank you
@salvinus17
@salvinus17 Жыл бұрын
thank you for this tutorial Robby, i really appreciate this. Simple and easy to understand
@FullStackJack
@FullStackJack Жыл бұрын
Great Tutorial! I understand how difficult it is to make something that looks so smooth and effortless. Thank you! 😃 I find Go attractive, but have never dived in deep. This tutorial makes me want to.
@hwp438
@hwp438 Жыл бұрын
Loved the way you are explaining things 🤟 Thankyou
@AsenovMiroslav
@AsenovMiroslav 11 ай бұрын
Thank you for the video! It was so helpful for me to find out how to do things in the Go way.
Жыл бұрын
I like how chill you are :) and video helped a lot thanks !
@3damina911
@3damina911 Жыл бұрын
Thanks for video, very easy and helpful to understand the basics!
@sourovahmad3555
@sourovahmad3555 Жыл бұрын
directly to the point. that's really awesome dude. keep it up
@Tobsson
@Tobsson 4 ай бұрын
That was quick and neat. Didn't manage to get the daemon running for some reason (couldn't install it correctly. my dist just yelled "NO!" without any reason) but just followed it step by step and got some grasp around it. All I need to do now is build a frontend to use it with hah!
@dekooks1543
@dekooks1543 Жыл бұрын
this was just brilliant from start to finish !!!
@joeywong2452
@joeywong2452 4 ай бұрын
Very good video with clear explanation! Thank you!
@EnTransic
@EnTransic Жыл бұрын
you made it look sooo easy. thanks! this saved me hours of googling ..
@freivincampbell
@freivincampbell 4 ай бұрын
More than excellent simple to understand, good explained every step
@viciousJavad
@viciousJavad Жыл бұрын
its amazing bro literally tons of information in "1" video.
@HeronHurpia
@HeronHurpia 7 күн бұрын
Really useful this video, I've seen some but this one is the best, no doubt! Congratulations!
@hilmialmuhtade8523
@hilmialmuhtade8523 11 ай бұрын
Thank you, sir! so clear and easy to understand. Great
@moslemghalandary4700
@moslemghalandary4700 Жыл бұрын
Oh my God i got to say it was my first time that i comment on a video if you are smart this video is yours it was great and i learned to much thank you man ,i really owe you
@mufinagamer
@mufinagamer 5 ай бұрын
great tutorials man!! a need to more tutorials with this!!
@eldorbeknormatov8773
@eldorbeknormatov8773 4 ай бұрын
Excellent simple to understand, good explained every step
@anuj7286
@anuj7286 Жыл бұрын
Thank you for sharing such a great topic!
@den_agung
@den_agung 9 ай бұрын
super clear tutorial than the others, thankyou!
@igorluizdesousasantos4965
@igorluizdesousasantos4965 3 ай бұрын
Awesome video. You are helping a lot. Thanks!
@vladasolovei6169
@vladasolovei6169 4 ай бұрын
What a great content, thank you, Robby!
@code1860
@code1860 2 жыл бұрын
Subscribed. Please keep them coming.
@iqbalalfiansyah5581
@iqbalalfiansyah5581 Ай бұрын
Amazing tutorial , it so simple and easy to understand it thank you so much
@L0wPressure
@L0wPressure Жыл бұрын
Thanks, practical tutorials are awesome :)
@RossWasTaken
@RossWasTaken Жыл бұрын
I never comment on coding videos but the 'creating a CRUD API' video and this one are both godsends, rare to have everything I needed so efficiently packed together, made my life really easy. it also isn't rocket science for us to branch off from the video since everything is done the way it is in the docs. Criminally underrated channel.
@phongbui3076
@phongbui3076 4 ай бұрын
So wonderful!!! This video is very helpful
@user-iq3dk8nt2w
@user-iq3dk8nt2w 10 ай бұрын
Thank you for the video. It was very useful to me
@PezhvakIMV
@PezhvakIMV 2 күн бұрын
Just what i was looking for, thank you
@mateenbagheri
@mateenbagheri Жыл бұрын
Very educational and on point.
@fatcamdog8528
@fatcamdog8528 Жыл бұрын
this was so helpful, very quik and ismple
@bjugdbjk
@bjugdbjk Жыл бұрын
Simply Amazing , u made it look so simple, Thanks a ton brother !! Could you do something on "Go-lang with kafka"
@jacqdie708
@jacqdie708 8 ай бұрын
you are incredible, thank you for everything
@mikhailkalashnik0v
@mikhailkalashnik0v Жыл бұрын
For part 2, it would be great if you can walk us thru how to turn this into a web page (user registration, login).
@johnxisde
@johnxisde Жыл бұрын
thanks for this tutorial Robby!
@charankamalsingh3860
@charankamalsingh3860 23 күн бұрын
Amazing Video! Thank you.
@wandersonsousa1891
@wandersonsousa1891 Жыл бұрын
Thank you a lot, great content!
@cassianoyasumitsu
@cassianoyasumitsu 5 ай бұрын
Thanks man! Learned a lot.
@bengraham1798
@bengraham1798 5 ай бұрын
Thank you for the video 💪
@yyovkov
@yyovkov 8 ай бұрын
Thank you for the good tutorial!
@fkaanoz
@fkaanoz Жыл бұрын
it's so good. thank you Robby.
@TheTokesh
@TheTokesh Жыл бұрын
Nice video, thank you!
@agustin6165
@agustin6165 3 ай бұрын
Very clear. Thanks
@yudistiraardi8741
@yudistiraardi8741 3 ай бұрын
SIR YOU ARE THE BEST! ❤
@tony-go-code
@tony-go-code Жыл бұрын
great tutorial, simple easy to understand and powerful. could you also make same with Fiber instead of Gin?
@nabazesmail6165
@nabazesmail6165 Жыл бұрын
Thank you it was amazing ❤
@mrashad_com
@mrashad_com 7 ай бұрын
Very helpful, thanks
@naimurhasanrwd
@naimurhasanrwd Жыл бұрын
so helpful to get started
@jamesmwangi2491
@jamesmwangi2491 11 ай бұрын
Practical tutorial very nice
@muneess2979
@muneess2979 Жыл бұрын
great job brother
@fernandhadzakysaputraazis57
@fernandhadzakysaputraazis57 Жыл бұрын
the best tutorial ever
@alifourka3720
@alifourka3720 6 ай бұрын
thanks for this great video
@gopalmatcha4436
@gopalmatcha4436 5 ай бұрын
thank you, good sir!
@csnawwa
@csnawwa 6 ай бұрын
great sutff robby....thank you
@mcphersonsound
@mcphersonsound 3 ай бұрын
good video. I ran into an issue where I couldn't sync the database, after multiple hours of debuging to no avail, I just followed along with the rest of the video since I really just wanted to learn the jwt part.
@lucasdamasceno7068
@lucasdamasceno7068 Жыл бұрын
thanks bro, nice project
@abhishekushwahaa
@abhishekushwahaa 3 ай бұрын
Thanks ❤ please make complete Full stack project with go.😊
@abbasnaqvi5381
@abbasnaqvi5381 Жыл бұрын
Great video
@nguyenminhsonk17hl68
@nguyenminhsonk17hl68 5 ай бұрын
Bro just got a new sub
@phoenix212
@phoenix212 Жыл бұрын
The expiration date for the JWT token doesn't have to checked manually, it auto checks if you set the expiration to claims["exp"].
@ichsanashiddiqi5138
@ichsanashiddiqi5138 Жыл бұрын
keep it up❤‍🔥❤‍🔥❤‍🔥
@ajith_e
@ajith_e 8 ай бұрын
Thank you!
@kakhabervk9405
@kakhabervk9405 11 ай бұрын
👍 great!
@paulgreen2761
@paulgreen2761 Жыл бұрын
Thank you so much!
@user-ds1mj9op2u
@user-ds1mj9op2u 11 ай бұрын
thanks it"s helpful for me.
@rivalheriyan1327
@rivalheriyan1327 Жыл бұрын
awww helpfull thanks bro
@bjornericcom
@bjornericcom Жыл бұрын
Nice! Thanks
@ManuelHernandez-co7zn
@ManuelHernandez-co7zn Жыл бұрын
You are the best
@buildfromzero
@buildfromzero Жыл бұрын
Perfect 👍
@vaibhavpanvalkar3025
@vaibhavpanvalkar3025 8 ай бұрын
Amazing
@shanexie2933
@shanexie2933 Жыл бұрын
thanks so much!
@mohamadbt4055
@mohamadbt4055 11 ай бұрын
amazing
@prajwalgowda5814
@prajwalgowda5814 Жыл бұрын
fab!!!!!!
@陸
@陸 7 ай бұрын
nice tutorial
@cristhianmoreno7695
@cristhianmoreno7695 Жыл бұрын
Muchas gracias 😄😄
@manee427
@manee427 Жыл бұрын
awesome
@polestartechconsultancy64
@polestartechconsultancy64 3 ай бұрын
Hi @codingwithrobby I really like your Go videos. Learned a lot from it. I have a question in this video: 1. You are making authentication using JWT and making a cookie in client. so, my question is, when we use front-end tech, like react or vue, do we need to setup the cookie from the front-end or back-end? if front-end, how will the middleware work? what will be it's code and structure?
@user-mv6bn7vb2s
@user-mv6bn7vb2s Жыл бұрын
it is a great tutorial
@MaybeAwab
@MaybeAwab Жыл бұрын
nice
@mkfixethio
@mkfixethio Жыл бұрын
Excellent video , thanks. please make more video about golang using docs. does anyone know any youtuber that teach from docs? once understand reading docs everything will be easy.
@arambp77
@arambp77 4 ай бұрын
i love you
@bartoszszar4889
@bartoszszar4889 Жыл бұрын
loved the video! would You consider linking the source code to the description?
@georgejoseph2601
@georgejoseph2601 Жыл бұрын
How did the error go away? I thought the error was because of how he misspelled SECRET in the .env file
@user-dx1zz7mq9n
@user-dx1zz7mq9n 8 ай бұрын
great tutorial, can i use that cookie based authentication with templates?
@who_fkn_cares
@who_fkn_cares 2 ай бұрын
is there a reason why you're not creating the jwt and storing it in a cookie for the signup handler? What are we doing for session management for first time users?
@iliadmitriev01
@iliadmitriev01 10 ай бұрын
wonderful tutorial! thanks for your work! btw what was the gui postgresql client at 17:18 ?
@codingwithrobby
@codingwithrobby 10 ай бұрын
Table plus
@Mirislomovmirjalol
@Mirislomovmirjalol Ай бұрын
i didn't get why you checking db in middleware? so what is the point of using jwt then?
@mostafa5863
@mostafa5863 Жыл бұрын
Thanks for your video One of the first things that attracted me was the auto import feature how can i get it in vs code?
@codingwithrobby
@codingwithrobby Жыл бұрын
Just install the official go extension for vs code. When you install it’ll suggest some other installs, click “install all”.
@user-di7gx3rc2q
@user-di7gx3rc2q Жыл бұрын
Thank you for so useful videos!
@user-ff2bs3ht3v
@user-ff2bs3ht3v 7 ай бұрын
getting a cors error when trying to fetch it on js.
@mertkaradayi3796
@mertkaradayi3796 11 ай бұрын
I am using apple silicon and compile daemon is not working for me. I can even not install it, it says GOBIN etc
How to organize a Go web app (MVC!)
23:21
Coding with Robby
Рет қаралды 16 М.
Creating a JSON CRUD API in Go (Gin/GORM)
34:08
Coding with Robby
Рет қаралды 112 М.
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 4,4 МЛН
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 119 МЛН
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 5 МЛН
Why is JWT popular?
5:14
ByteByteGo
Рет қаралды 293 М.
CATASTROPHIC Chess
24:21
GothamChess
Рет қаралды 215 М.
Why I'm learning Go
21:35
Web Dev Cody
Рет қаралды 59 М.
Advanced Golang: Generics Explained
13:37
Code With Ryan
Рет қаралды 58 М.
What Is JWT and Why Should You Use JWT
14:53
Web Dev Simplified
Рет қаралды 1,1 МЛН
What is JWT? JSON Web Tokens Explained (Java Brains)
14:53
Java Brains
Рет қаралды 1 МЛН
Отдых для геймера? 😮‍💨 Hiper Engine B50
1:00
Вэйми
Рет қаралды 1,2 МЛН
Самые крутые школьные гаджеты
0:49