mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-05-20 11:59:53 +00:00
feat: delete OAuth refresh token on RP initiated logout (#1480)
This commit is contained in:
@@ -13,11 +13,12 @@ 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) {
|
||||
export async function generateIdToken(jti: string, 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
|
||||
|
||||
const payload = {
|
||||
jti,
|
||||
aud: clientId,
|
||||
email: user.email,
|
||||
email_verified: true,
|
||||
|
||||
Reference in New Issue
Block a user