JWT Authentication in Go (Gin/Gorm)

preview_player
Показать описание
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

Like and subscribe!
Рекомендации по теме
Комментарии
Автор

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

YidiEnterprises
Автор

aweome. thank you. PS: that typo in SECRET in the ENV was killing me the whole time :))))

rezaverse
Автор

I prefer more straightforward, clean and structured videos like these.. great work man! Just subbed! 👾

ahamedlincon
Автор

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.

fabtjar
Автор

Your videos are awesome! Straight forward and super helpful. Keep it up.

terrytas
Автор

Dude, your a life saver. Love how you explain the code clear without any part of the video. Thankyou.

lph
Автор

Amazing tutorial. Love the way you arrange your files and structure your code. Neat!

toheebojuolape
Автор

Great content, appreciate you putting it out there. As a new’ish developer, it would be really cool to see someone put out how they determine what external packages or dependencies to use. It’s easy for someone like me to find a tutorial video like this, follow along and get _something_ that works. I think there would be value in seeing the behind the scenes, if you will, thought process behind design and determining factors of what goes into building the project. Maybe I’m wrong, but that’s the real magic.

lloydChristmas-jn
Автор

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?

polestartechconsultancy
Автор

Clear, concise and straightforward. Thanks man!

Dzikrullah_
Автор

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!

Tobsson
Автор

Could you please share the GitHub repository for this code.

AyushSisodia-mi
Автор

absolutely brilliant tutorial. easy to follow and understand. dont usually comment but thank you so much for this!

MinecrftGaming
Автор

your middleware usage is much more clean readable than others imo, thank you

QuangMinh-gmxb
Автор

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?

who_fkn_cares
Автор

More than excellent simple to understand, good explained every step

freivincampbell
Автор

Nice video, really great for an developer starting out with go backend-services! Great you also covered other basic topics next to just JWT!

thenerens
Автор

Loved the way you are explaining things 🤟 Thankyou

hwp
Автор

i didn't get why you checking db in middleware? so what is the point of using jwt then?

Mirislomovmirjalol
Автор

Really useful this video, I've seen some but this one is the best, no doubt! Congratulations!

HeronHurpia