v1.1.0: keyboard shortcuts (CH), onboarding tour, admin projects tab, remember-me login, Luftbild CH removed, hose settings in admin, credit link, font Barlow, map auto-save viewport, rate-limit 10/5min
This commit is contained in:
@@ -21,11 +21,11 @@ export interface UserPayload {
|
||||
emailVerified?: boolean
|
||||
}
|
||||
|
||||
export async function createToken(user: UserPayload): Promise<string> {
|
||||
export async function createToken(user: UserPayload, rememberMe = false): Promise<string> {
|
||||
return await new SignJWT({ user })
|
||||
.setProtectedHeader({ alg: 'HS256' })
|
||||
.setIssuedAt()
|
||||
.setExpirationTime('24h')
|
||||
.setExpirationTime(rememberMe ? '30d' : '24h')
|
||||
.sign(JWT_SECRET)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user