New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cocreate/authenticate

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cocreate/authenticate - npm Package Compare versions

Comparing version 1.3.4 to 1.3.5

8

CHANGELOG.md

@@ -0,1 +1,9 @@

## [1.3.5](https://github.com/CoCreate-app/CoCreate-authenticate/compare/v1.3.4...v1.3.5) (2023-10-09)
### Bug Fixes
* decodeToken accepts a token ([bfd47fb](https://github.com/CoCreate-app/CoCreate-authenticate/commit/bfd47fb27d6285245c765918fb572713ba500ef6))
* return user_id and expiration ([58e9e4b](https://github.com/CoCreate-app/CoCreate-authenticate/commit/58e9e4b73522f1157bd1f26223a6e2fbd3e69f4a))
## [1.3.4](https://github.com/CoCreate-app/CoCreate-authenticate/compare/v1.3.3...v1.3.4) (2023-09-18)

@@ -2,0 +10,0 @@

4

package.json
{
"name": "@cocreate/authenticate",
"version": "1.3.4",
"version": "1.3.5",
"description": "A simple authenticate component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",

@@ -43,5 +43,5 @@ "keywords": [

"dependencies": {
"@cocreate/uuid": "^1.7.1",
"@cocreate/uuid": "^1.7.2",
"jsonwebtoken": "^9.0.0"
}
}

@@ -114,5 +114,3 @@ const jwt = require('jsonwebtoken');

// Verify and decode a token using the available keys
function decodeToken(req) {
const headers = req.headers;
const token = headers['sec-websocket-protocol'];
function decodeToken(token) {
const currentTime = new Date().getTime();

@@ -122,3 +120,3 @@

if (user && currentTime < user.expires)
return user._id;
return { user_id: user._id, expires: user.expires };

@@ -125,0 +123,0 @@ users.delete(token)

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