forked from nixcn/nixcn-cms
Impl magic login logic && checkin logic
Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"nixcn-cms/internal/crypto/jwt"
|
||||
"nixcn-cms/pkgs/magiclink"
|
||||
"nixcn-cms/pkgs/turnstile"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
log "github.com/sirupsen/logrus"
|
||||
@@ -35,7 +34,7 @@ func RequestMagicLink(c *gin.Context) {
|
||||
}
|
||||
|
||||
// Generate magic token
|
||||
token, err := magiclink.NewMagicToken(req.Email, 15*time.Minute)
|
||||
token, err := magiclink.NewMagicToken(req.Email)
|
||||
if err != nil {
|
||||
c.JSON(500, gin.H{"error": "internal error"})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user