Skip to content

Instantly share code, notes, and snippets.

View muhammadqazi's full-sized avatar
🎯
Focusing

Muhammad Qazi muhammadqazi

🎯
Focusing
View GitHub Profile
@muhammadqazi
muhammadqazi / user-struct.go
Created February 6, 2022 10:42
Go-Authentication
type UserModel struct {
ID primitive.ObjectID `bson:"_id"`
First_name string `json:"first_name" validate:"required,min=2,max=100"`
Last_name string `json:"last_name" validate:"required,min=2,max=100"`
Password string `json:"Password" validate:"required,min=6,max=20"`
Email string `json:"email" validate:"email,required"`
Phone int `json:"phone" validate:"required"`
Token string `json:"token"`
Refresh_token string `json:"refresh_token"`
@muhammadqazi
muhammadqazi / man.go
Last active February 6, 2022 10:37
Go-Authentication
package main
import (
"net/http"
EmailVerification "GO/routes/Auth/EmailVerification"
ForgotPass "GO/routes/Auth/ForgotPass"
GoogleAuth "GO/routes/Auth/GoogleAuthenticator"
Signin "GO/routes/Auth/Signin"
Signup "GO/routes/Auth/Signup"