mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-14 14:07:32 +00:00
refactor: migrate shadcn-components to Svelte 5 and TW4 (#551)
Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
committed by
Elias Schneider
parent
05b443d984
commit
28c85990ba
@@ -13,7 +13,6 @@ type User = {
|
||||
const privateKey = JSON.parse(PRIVATE_KEY_STRING);
|
||||
const privateKeyImported = await jose.importJWK(privateKey, 'RS256');
|
||||
|
||||
|
||||
export async function generateIdToken(user: User, clientId: string, expired = false) {
|
||||
const now = Math.floor(Date.now() / 1000);
|
||||
const expiration = expired ? now + 1 : now + 1000000000; // Either expired or valid for a long time
|
||||
@@ -38,7 +37,6 @@ export async function generateIdToken(user: User, clientId: string, expired = fa
|
||||
.sign(privateKeyImported);
|
||||
}
|
||||
|
||||
|
||||
export async function generateOauthAccessToken(user: User, clientId: string, expired = false) {
|
||||
const now = Math.floor(Date.now() / 1000);
|
||||
const expiration = expired ? now - 1000 : now + 1000000000; // Either expired or valid for a long time
|
||||
|
||||
Reference in New Issue
Block a user