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

@adonisjs/auth

Package Overview
Dependencies
Maintainers
2
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adonisjs/auth - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1

22

build/instructions.js

@@ -10,21 +10,2 @@ "use strict";

*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -37,3 +18,2 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

const utils_1 = require("@poppinss/utils");
const sinkStatic = __importStar(require("@adonisjs/sink"));
const USER_MIGRATION_TIME_PREFIX = '1587988332388';

@@ -317,3 +297,1 @@ const TOKENS_MIGRATION_TIME_PREFIX = '1592489784670';

exports.default = instructions;
const standalone_1 = require("@adonisjs/application/build/standalone");
instructions(path_1.join(__dirname, 'sample'), new standalone_1.Application(path_1.join(__dirname, 'sample'), {}, {}, {}), sinkStatic).catch(console.log);

9

build/src/TokenProviders/Database/index.js

@@ -60,4 +60,11 @@ "use strict";

const { name, user_id, token: value, expires_at, type, ...meta } = tokenRow;
const expiresAt = expires_at ? luxon_1.DateTime.fromFormat(expires_at, client.dialect.dateTimeFormat) : undefined;
/**
* Ensure token isn't expired
*/
if (expiresAt && expiresAt.diff(luxon_1.DateTime.local(), 'millisecond').milliseconds <= 0) {
return null;
}
const token = new ProviderToken_1.ProviderToken(name, value, user_id, type);
token.expiresAt = expires_at ? luxon_1.DateTime.fromFormat(expires_at, client.dialect.dateTimeFormat) : undefined;
token.expiresAt = expiresAt;
token.meta = meta;

@@ -64,0 +71,0 @@ return token;

{
"name": "@adonisjs/auth",
"version": "4.2.0",
"version": "4.2.1",
"description": "Offical authentication provider for Adonis framework",

@@ -51,3 +51,3 @@ "types": "build/adonis-typings/index.d.ts",

"@adonisjs/hash": "^3.1.1",
"@adonisjs/lucid": "^8.1.1",
"@adonisjs/lucid": "^8.2.1",
"@adonisjs/mrm-preset": "^2.3.0",

@@ -54,0 +54,0 @@ "@adonisjs/profiler": "^3.0.4",

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