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.2 to 4.2.3

14

build/src/TokenProviders/Database/index.js

@@ -60,4 +60,16 @@ "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;
let expiresAt;
/**
* Parse dialect date to an instance of Luxon
*/
if (expires_at instanceof Date) {
expiresAt = luxon_1.DateTime.fromJSDate(expires_at);
}
else if (expires_at && typeof (expires_at) === 'string') {
expiresAt = luxon_1.DateTime.fromFormat(expires_at, client.dialect.dateTimeFormat);
}
else if (expires_at && typeof (expires_at) === 'number') {
expiresAt = luxon_1.DateTime.fromMillis(expires_at);
}
/**
* Ensure token isn't expired

@@ -64,0 +76,0 @@ */

2

build/templates/migrations/api_tokens.txt

@@ -9,3 +9,3 @@ import BaseSchema from '@ioc:Adonis/Lucid/Schema'

table.increments('id').primary()
table.integer('user_id').references('id').inTable('users').onDelete('CASCADE')
table.integer('user_id').unsigned().references('id').inTable('users').onDelete('CASCADE')
table.string('name').notNullable()

@@ -12,0 +12,0 @@ table.string('type').notNullable()

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

@@ -5,0 +5,0 @@ "types": "build/adonis-typings/index.d.ts",

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