Registering Users with Email Verification - Gin

  Рет қаралды 4,998

Grow Adept

Grow Adept

Күн бұрын

Пікірлер: 16
@iCrimzon
@iCrimzon 10 ай бұрын
Hey mate, for the env file, when I try to copy paste the code for testing purposes, I removed the os.Getenv just as to not make env variables, what should I put? For example, servLoc = "local"? Because I get errors in main.go and email.go files pertaining to those variables as "undefined"
@GrowAdept
@GrowAdept 10 ай бұрын
At the start of the video I should have explained how to run multiple files that are all part of "package main". For instance main.go and env.go both have "package main" at the top, which is still appropriate when breaking code into more organized files. They are both part of package main, as well as some other files. Unfortunately I should have mentioned that we can't just use "go run main.go" to run our app. That would run the main.go file but the env.go file will not populate our variables for us. Solution: use "go run ." to run all the files in this directory and it should work. Please note the ".", because "go run" without it won't work, it says to use all the files in current directory. So now you should be able to save servLoc = "local" and it should work. This is useful to know as some Github projects also have multiple files for package main. I hope this helps and happy coding!
@iCrimzon
@iCrimzon 10 ай бұрын
@@GrowAdept one more question, ive been trying to debug it for forever but all the files are package main yet i still have errors under servLoc and fromEmail etc, do i need to import the other files into my main.go or what? I tried importing them but still had errors, or does go run . solve this issue as well
@hiyoutube6769
@hiyoutube6769 Жыл бұрын
the very good lesson. Thank you bro
@GrowAdept
@GrowAdept Жыл бұрын
You are very welcome, I am glad it was helpful. :)
@NitroBrewbell
@NitroBrewbell 7 ай бұрын
Does the email verification function need to check for timeout period if it elapsed ? I don't see a line for check. Perhaps the database is expunging it automatically but I highly doubt it.
@GrowAdept
@GrowAdept 7 ай бұрын
Good catch. Looking at emailverGEThandler() there is a check that username exists, and that the given password matches with the saved hash in the database, but I don't see a check for the timeout period. Thank you for catching this, I will need to add this check. If it fails, we will also need code to either send a reminder email, provide another verification option or purge the unverified account.
@myotun9271
@myotun9271 2 жыл бұрын
new to go and web dev general. huge thanks for this! how should the folders/files be organised to keep it clean/organised?
@GrowAdept
@GrowAdept 2 жыл бұрын
Glad to hear someone new is learning Go, welcome. Try this vid kzbin.info/www/bejne/sJnLhJ-arbWHeNk it explains some of the concepts of how and when to split up code as well as some of the pathing for imports. Let me know if this helps, cheers!
@bellosegun
@bellosegun 2 жыл бұрын
Wow ...just found your channel..been looking for this kind of content..I appreciate your effort and the world wide web does too... What about refresh tokens, forgot password and revalidate email incase the first one expires. Are these coming up?
@GrowAdept
@GrowAdept 2 жыл бұрын
Thank you very much, glad the content is useful. The forgot password account recovery vid is up in a few hours. I plan on eventually doing a series of videos on tokens but have a project to do first.
@bellosegun
@bellosegun 2 жыл бұрын
Wow …. Thanks so far…
@flamejoy2843
@flamejoy2843 Жыл бұрын
thx for lesson
@GrowAdept
@GrowAdept Жыл бұрын
You are welcome. :)
@Krishna-bz5bs
@Krishna-bz5bs 2 жыл бұрын
GitHub link for code?
@GrowAdept
@GrowAdept 2 жыл бұрын
Thank you, I forgot that, go ahead are refresh and it should be there.
Forgot Password (Account Recovery)- Gin
25:40
Grow Adept
Рет қаралды 1,2 М.
Registering Users - Golang Web Dev
28:21
Grow Adept
Рет қаралды 6 М.
Бенчик, пора купаться! 🛁 #бенчик #арти #симбочка
00:34
Симбочка Пимпочка
Рет қаралды 3,9 МЛН
НАШЛА ДЕНЬГИ🙀@VERONIKAborsch
00:38
МишАня
Рет қаралды 3,1 МЛН
Это было очень близко...
00:10
Аришнев
Рет қаралды 6 МЛН
小蚂蚁会选到什么呢!#火影忍者 #佐助 #家庭
00:47
火影忍者一家
Рет қаралды 124 МЛН
Authentication w/ Gin and Gorilla Sessions - Gin
17:16
Grow Adept
Рет қаралды 6 М.
Sending Email with Go (net/smtp, gomail, and  sendgrid)
15:23
Coding with Robby
Рет қаралды 14 М.
Building a Go Authentication System (Native)
16:44
Golang Dojo
Рет қаралды 17 М.
Verifying Email Addresses - Golang Web Dev
25:28
Grow Adept
Рет қаралды 2,5 М.
JWT Authentication in Go (Gin/Gorm)
35:26
Coding with Robby
Рет қаралды 74 М.
Golang Authentication with JWT, using Gin-Gonic and MongoDB
22:33
Akhil Sharma
Рет қаралды 34 М.
Архитектура Go проекта на практике
30:09
Evrone Development
Рет қаралды 17 М.
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 341 М.
JWT token based authentication/authorization in Golang (REST API's)
30:02
Daily Code Buffer
Рет қаралды 39 М.
Бенчик, пора купаться! 🛁 #бенчик #арти #симбочка
00:34
Симбочка Пимпочка
Рет қаралды 3,9 МЛН