JWT Authentication in Go (Gin/Gorm)

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

ความคิดเห็น • 146

  • @YidiEnterprises
    @YidiEnterprises 4 หลายเดือนก่อน +17

    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

  • @rezaverse
    @rezaverse 3 หลายเดือนก่อน +6

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

  • @fabtjar
    @fabtjar 2 ปีที่แล้ว +9

    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.

  • @ahamedlincon4980
    @ahamedlincon4980 5 หลายเดือนก่อน +2

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

  • @lph189
    @lph189 2 หลายเดือนก่อน

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

  • @terrytas13
    @terrytas13 2 ปีที่แล้ว +18

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

  • @toheebojuolape3736
    @toheebojuolape3736 ปีที่แล้ว +6

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

  • @lloydChristmas-j6n
    @lloydChristmas-j6n หลายเดือนก่อน

    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.

  • @Dzikrullah_999
    @Dzikrullah_999 ปีที่แล้ว +4

    Clear, concise and straightforward. Thanks man!

  • @MinecrftGaming
    @MinecrftGaming 4 หลายเดือนก่อน

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

  • @Tobsson
    @Tobsson 9 หลายเดือนก่อน

    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!

  • @QuangMinh-gm3xb
    @QuangMinh-gm3xb ปีที่แล้ว +1

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

  • @freivincampbell
    @freivincampbell 8 หลายเดือนก่อน

    More than excellent simple to understand, good explained every step

  • @HeronHurpia
    @HeronHurpia 4 หลายเดือนก่อน

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

  • @nasxmo
    @nasxmo 2 ปีที่แล้ว +2

    Your videos on Go really good and clean. Keep creating more videos on Go!

  • @the0nerens
    @the0nerens ปีที่แล้ว

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

  • @RossWasTaken
    @RossWasTaken ปีที่แล้ว +1

    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.

  • @AsenovMiroslav
    @AsenovMiroslav ปีที่แล้ว

    Thank you for the video! It was so helpful for me to find out how to do things in the Go way.

  • @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

  • @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 ปีที่แล้ว +2

    Loved the way you are explaining things 🤟 Thankyou

  • @eldorbeknormatov8773
    @eldorbeknormatov8773 9 หลายเดือนก่อน

    Excellent simple to understand, good explained every step

  • @polestartechconsultancy64
    @polestartechconsultancy64 7 หลายเดือนก่อน +1

    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?

  • @joeywong2452
    @joeywong2452 8 หลายเดือนก่อน

    Very good video with clear explanation! Thank you!

  • @mikhailkalashnik0v
    @mikhailkalashnik0v ปีที่แล้ว +2

    For part 2, it would be great if you can walk us thru how to turn this into a web page (user registration, login).

  • @salvinus17
    @salvinus17 ปีที่แล้ว

    thank you for this tutorial Robby, i really appreciate this. Simple and easy to understand

  • @Prakyy
    @Prakyy 2 หลายเดือนก่อน

    Thanks, just made my first backend system.

  • @EnTransic
    @EnTransic ปีที่แล้ว

    you made it look sooo easy. thanks! this saved me hours of googling ..

  • @iqbalalfiansyah5581
    @iqbalalfiansyah5581 5 หลายเดือนก่อน

    Amazing tutorial , it so simple and easy to understand it thank you so much

  • @SMJ-Majidi
    @SMJ-Majidi 2 ปีที่แล้ว

    its amazing bro literally tons of information in "1" video.

  • @hilmialmuhtade8523
    @hilmialmuhtade8523 ปีที่แล้ว

    Thank you, sir! so clear and easy to understand. Great

  • @PezhvakIMV
    @PezhvakIMV 4 หลายเดือนก่อน

    Just what i was looking for, thank you

  • @den_agung
    @den_agung ปีที่แล้ว

    super clear tutorial than the others, thankyou!

  • @raunakagarwal6077
    @raunakagarwal6077 หลายเดือนก่อน

    Super brilliant video for extreme beginner like me

  • @mufinagamer
    @mufinagamer 10 หลายเดือนก่อน

    great tutorials man!! a need to more tutorials with this!!

  • @sourovahmad3555
    @sourovahmad3555 2 ปีที่แล้ว

    directly to the point. that's really awesome dude. keep it up

  • @3damina911
    @3damina911 2 ปีที่แล้ว

    Thanks for video, very easy and helpful to understand the basics!

  • @phoenix212
    @phoenix212 ปีที่แล้ว +1

    The expiration date for the JWT token doesn't have to checked manually, it auto checks if you set the expiration to claims["exp"].

  • @igorluizdesousasantos4965
    @igorluizdesousasantos4965 7 หลายเดือนก่อน

    Awesome video. You are helping a lot. Thanks!

  • @phongbui3076
    @phongbui3076 9 หลายเดือนก่อน

    So wonderful!!! This video is very helpful

  • @vladasolovei6169
    @vladasolovei6169 8 หลายเดือนก่อน

    What a great content, thank you, Robby!

  • @anuj7286
    @anuj7286 ปีที่แล้ว

    Thank you for sharing such a great topic!

  • @bjugdbjk
    @bjugdbjk ปีที่แล้ว +1

    Simply Amazing , u made it look so simple, Thanks a ton brother !!
    Could you do something on "Go-lang with kafka"

  • @jacqdie708
    @jacqdie708 ปีที่แล้ว

    you are incredible, thank you for everything

  • @dekooks1543
    @dekooks1543 2 ปีที่แล้ว

    this was just brilliant from start to finish !!!

  • @mcphersonsound
    @mcphersonsound 7 หลายเดือนก่อน

    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.

  • @yjx-m7k
    @yjx-m7k ปีที่แล้ว

    Thank you for the video. It was very useful to me

  • @L0wPressure
    @L0wPressure ปีที่แล้ว

    Thanks, practical tutorials are awesome :)

  • @fatcamdog8528
    @fatcamdog8528 ปีที่แล้ว

    this was so helpful, very quik and ismple

  • @yudistiraardi8741
    @yudistiraardi8741 8 หลายเดือนก่อน

    SIR YOU ARE THE BEST! ❤

  • @agustin6165
    @agustin6165 7 หลายเดือนก่อน

    Very clear. Thanks

  • @fernandhadzakysaputraazis57
    @fernandhadzakysaputraazis57 ปีที่แล้ว

    the best tutorial ever

  • @AyushSisodia-m3i
    @AyushSisodia-m3i 5 หลายเดือนก่อน +3

    Could you please share the GitHub repository for this code.

  • @jamesmwangi2491
    @jamesmwangi2491 ปีที่แล้ว

    Practical tutorial very nice

  • @yyovkov
    @yyovkov ปีที่แล้ว

    Thank you for the good tutorial!

  • @gopalmatcha4436
    @gopalmatcha4436 9 หลายเดือนก่อน

    thank you, good sir!

  • @abhishekushwahaa
    @abhishekushwahaa 7 หลายเดือนก่อน

    Thanks ❤ please make complete Full stack project with go.😊

  • @mateenbagheri
    @mateenbagheri 2 ปีที่แล้ว

    Very educational and on point.

  • @cassianoyasumitsu
    @cassianoyasumitsu 10 หลายเดือนก่อน

    Thanks man! Learned a lot.

  • @code1860
    @code1860 2 ปีที่แล้ว

    Subscribed. Please keep them coming.

  • @who_fkn_cares
    @who_fkn_cares 7 หลายเดือนก่อน +1

    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?

  • @tharaka911
    @tharaka911 10 หลายเดือนก่อน

    great sutff robby....thank you

  • @mrashad_com
    @mrashad_com 11 หลายเดือนก่อน

    Very helpful, thanks

  • @alifourka3720
    @alifourka3720 10 หลายเดือนก่อน

    thanks for this great video

  • @fkaanoz
    @fkaanoz ปีที่แล้ว

    it's so good. thank you Robby.

  • @naimurhasanrwd
    @naimurhasanrwd ปีที่แล้ว

    so helpful to get started

  • @scottamolinari
    @scottamolinari 19 วันที่ผ่านมา

    Hi thanks for this video. It was great and informative.
    One point of critique though. Wherever your mic is, it makes your keyboard typing sound like an ASMR video and for me, quite distracting. Especially since there is some kind of noise that sounds not normal keyboard like. If the sounds were just the normal thok, thok, thok of a keyboard, I'd almost be ok with it, but your keyboard does some funky noises. 😛🤷‍♂

  • @ManuelHernandez-co7zn
    @ManuelHernandez-co7zn ปีที่แล้ว

    You are the best

  • @mkfixethio
    @mkfixethio ปีที่แล้ว +1

    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.

  • @johnxisde
    @johnxisde 2 ปีที่แล้ว

    thanks for this tutorial Robby!

  • @wandersonsousa1891
    @wandersonsousa1891 ปีที่แล้ว

    Thank you a lot, great content!

  • @georgejoseph2601
    @georgejoseph2601 ปีที่แล้ว +1

    How did the error go away? I thought the error was because of how he misspelled SECRET in the .env file

  • @kakhabervk9405
    @kakhabervk9405 ปีที่แล้ว

    👍 great!

  • @gpthaoyugpt
    @gpthaoyugpt ปีที่แล้ว

    thanks it"s helpful for me.

  • @nguyenminhsonk17hl68
    @nguyenminhsonk17hl68 9 หลายเดือนก่อน

    Bro just got a new sub

  • @diansaputrahadiwijaya4094
    @diansaputrahadiwijaya4094 2 หลายเดือนก่อน

    Greetings Robby,
    I just started learning golang, previously I used angular as a frontend and laravel as a backend.
    I am very helped by the videos you made, can you make a tutorial on golang as a backend and nextjs as a frontend?
    It would be better if it started from JWT Authentication
    Thank you in advance

  • @nabazesmail6165
    @nabazesmail6165 ปีที่แล้ว

    Thank you it was amazing ❤

  • @tony-go-code
    @tony-go-code ปีที่แล้ว +1

    great tutorial, simple easy to understand and powerful.
    could you also make same with Fiber instead of Gin?

  • @iliadmitriev01
    @iliadmitriev01 ปีที่แล้ว

    wonderful tutorial! thanks for your work!
    btw what was the gui postgresql client at 17:18 ?

  • @TheTokesh
    @TheTokesh 2 ปีที่แล้ว

    Nice video, thank you!

  • @lucasdamasceno7068
    @lucasdamasceno7068 ปีที่แล้ว

    thanks bro, nice project

  • @ajith_e
    @ajith_e ปีที่แล้ว

    Thank you!

  • @rivalheriyan1327
    @rivalheriyan1327 ปีที่แล้ว

    awww helpfull thanks bro

  • @ДаниялКожакметов-и9ф
    @ДаниялКожакметов-и9ф ปีที่แล้ว

    great tutorial, can i use that cookie based authentication with templates?

  • @ichsanashiddiqi5138
    @ichsanashiddiqi5138 2 ปีที่แล้ว

    keep it up❤‍🔥❤‍🔥❤‍🔥

  • @Mirislomovmirjalol
    @Mirislomovmirjalol 5 หลายเดือนก่อน +2

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

  • @abbasnaqvi5381
    @abbasnaqvi5381 ปีที่แล้ว

    Great video

  • @prajwalgowda5814
    @prajwalgowda5814 ปีที่แล้ว

    fab!!!!!!

  • @chiragmehta2955
    @chiragmehta2955 2 หลายเดือนก่อน +1

    please share github repo of this,that would be a great help!!

  • @buildfromzero
    @buildfromzero ปีที่แล้ว

    Perfect 👍

  • @muneess2979
    @muneess2979 2 ปีที่แล้ว

    great job brother

  • @mostafa5863
    @mostafa5863 ปีที่แล้ว +1

    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  ปีที่แล้ว +2

      Just install the official go extension for vs code. When you install it’ll suggest some other installs, click “install all”.

  • @imertkaradayi
    @imertkaradayi ปีที่แล้ว

    I am using apple silicon and compile daemon is not working for me. I can even not install it, it says GOBIN etc

  • @bartoszszar4889
    @bartoszszar4889 ปีที่แล้ว +1

    loved the video! would You consider linking the source code to the description?

  • @SuperAthuy
    @SuperAthuy ปีที่แล้ว

    amazing

  • @bjornericcom
    @bjornericcom 2 ปีที่แล้ว

    Nice! Thanks

  • @ipigtaiwan
    @ipigtaiwan 11 หลายเดือนก่อน

    nice tutorial

  • @shanexie2933
    @shanexie2933 2 ปีที่แล้ว

    thanks so much!

  • @cristhianmoreno7695
    @cristhianmoreno7695 ปีที่แล้ว

    Muchas gracias 😄😄

  • @JhonatanMorais
    @JhonatanMorais ปีที่แล้ว

    HEy one question about security. You are returning the password as part of response (models.user, see 00:35:35). of course this is an example BUT It could easily happen in a real world situation. What is the best practice to avoid this in go/GORM? Should we move the pass-hash to another table? or there is some specific config to tell fiber/GORM that passwordfield is a sensitive field? or instead of use the find-gorn method we create a query with specific fields?

    • @longdashes
      @longdashes ปีที่แล้ว

      You could just remove the field, before returning the User JSON.

    • @ramadhanngallen9217
      @ramadhanngallen9217 ปีที่แล้ว +1

      On your struct exclude it to be exposed like `type User struct {
      Email string `json:"email"`
      Password string `json:"-"`
      ....
      }`
      The - will exclude it to be exposed

    • @rainfog_mzb
      @rainfog_mzb ปีที่แล้ว +1

      @@ramadhanngallen9217 Thanks for your tips. I have some trouble about it and then the problem is solved

    • @ramadhanngallen9217
      @ramadhanngallen9217 ปีที่แล้ว

      @@rainfog_mzbYou're welcome