You've already forked pocketbase
mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-12-11 03:56:11 +02:00
initial v0.8 pre-release
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
// NewAdminAuthToken generates and returns a new admin authentication token.
|
||||
func NewAdminAuthToken(app core.App, admin *models.Admin) (string, error) {
|
||||
return security.NewToken(
|
||||
jwt.MapClaims{"id": admin.Id, "type": "admin"},
|
||||
jwt.MapClaims{"id": admin.Id, "type": TypeAdmin},
|
||||
(admin.TokenKey + app.Settings().AdminAuthToken.Secret),
|
||||
app.Settings().AdminAuthToken.Duration,
|
||||
)
|
||||
@@ -19,7 +19,7 @@ func NewAdminAuthToken(app core.App, admin *models.Admin) (string, error) {
|
||||
// NewAdminResetPasswordToken generates and returns a new admin password reset request token.
|
||||
func NewAdminResetPasswordToken(app core.App, admin *models.Admin) (string, error) {
|
||||
return security.NewToken(
|
||||
jwt.MapClaims{"id": admin.Id, "type": "admin", "email": admin.Email},
|
||||
jwt.MapClaims{"id": admin.Id, "type": TypeAdmin, "email": admin.Email},
|
||||
(admin.TokenKey + app.Settings().AdminPasswordResetToken.Secret),
|
||||
app.Settings().AdminPasswordResetToken.Duration,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user