feat(auth): Add /token endpoint to request a access token
This commit is contained in:
@@ -33,7 +33,7 @@ func (authorization *Authorization) BeforeCreate(tx *gorm.DB) (err error) {
|
||||
}
|
||||
authorization.Code = codeHash
|
||||
if authorization.ExpiresAt == nil {
|
||||
expiresAt := time.Now().Add(time.Minute * 10)
|
||||
expiresAt := time.Now().Add(time.Minute * 2)
|
||||
authorization.ExpiresAt = &expiresAt
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user