Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elysia-auth-drizzle

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elysia-auth-drizzle - npm Package Compare versions

Comparing version 1.2.10 to 1.2.11

3

dist/index.d.ts

@@ -38,7 +38,6 @@ import * as Elysia from 'elysia';

tokensSchema?: any;
}) => (refreshToken: string, { secret, refreshSecret, accessTokenTime, ownerId, }: {
}) => (refreshToken: string, { secret, refreshSecret, accessTokenTime, }: {
secret: string;
refreshSecret?: string | undefined;
accessTokenTime: string;
ownerId?: string | undefined;
}) => Promise<{

@@ -45,0 +44,0 @@ accessToken: string;

@@ -831,7 +831,7 @@ 'use strict';

refreshSecret,
accessTokenTime,
ownerId
accessTokenTime
}) => {
let content;
try {
jsonwebtoken.verify(refreshToken, refreshSecret || secret);
content = jsonwebtoken.verify(refreshToken, refreshSecret || secret);
} catch (error) {

@@ -856,3 +856,3 @@ if (tokensSchema) {

}
const accessToken = jsonwebtoken.sign({ id: token?.ownerId || ownerId }, secret, {
const accessToken = jsonwebtoken.sign({ id: token?.ownerId || content?.id }, secret, {
expiresIn: accessTokenTime

@@ -859,0 +859,0 @@ });

{
"name": "elysia-auth-drizzle",
"version": "1.2.10",
"version": "1.2.11",
"main": "./dist/index.js",

@@ -5,0 +5,0 @@ "typings": "dist/index.d.ts",

@@ -115,3 +115,2 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */

accessTokenTime,
ownerId,
}: {

@@ -121,7 +120,9 @@ secret: string;

accessTokenTime: string;
ownerId?: string;
},
) => {
let content;
try {
verify(refreshToken, refreshSecret || secret);
content = verify(refreshToken, refreshSecret || secret) as {
id: string;
};
} catch (error) {

@@ -159,3 +160,3 @@ if (tokensSchema) {

// Renew Token
const accessToken = sign({ id: token?.ownerId || ownerId }, secret, {
const accessToken = sign({ id: token?.ownerId || content?.id }, secret, {
expiresIn: accessTokenTime,

@@ -162,0 +163,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc