feat: add support for magic link login (#65)
* feat: add support for magic link login * update readme
This commit is contained in:
@@ -208,7 +208,7 @@ func OAuthCallbackHandler() gin.HandlerFunc {
|
||||
|
||||
signupMethod := existingUser.SignupMethod
|
||||
if !strings.Contains(signupMethod, provider) {
|
||||
signupMethod = signupMethod + "," + enum.Github.String()
|
||||
signupMethod = signupMethod + "," + provider
|
||||
}
|
||||
user.SignupMethod = signupMethod
|
||||
user.Password = existingUser.Password
|
||||
|
@@ -46,7 +46,9 @@ func VerifyEmailHandler() gin.HandlerFunc {
|
||||
}
|
||||
|
||||
// update email_verified_at in users table
|
||||
db.Mgr.UpdateVerificationTime(time.Now().Unix(), user.ID)
|
||||
if user.EmailVerifiedAt <= 0 {
|
||||
db.Mgr.UpdateVerificationTime(time.Now().Unix(), user.ID)
|
||||
}
|
||||
// delete from verification table
|
||||
db.Mgr.DeleteToken(claim.Email)
|
||||
|
||||
|
Reference in New Issue
Block a user