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

@peable/services

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peable/services - npm Package Compare versions

Comparing version 0.0.49 to 0.0.50

2

dist/hooks/usePeableSession.d.ts

@@ -17,3 +17,3 @@ interface SessionData {

session: SessionData | null;
status: "loading" | "loaded";
status: "loading" | "authenticated" | "unauthenticated";
error: string | null;

@@ -20,0 +20,0 @@ };

@@ -12,2 +12,4 @@ import { useState, useEffect } from "react";

if (!storedToken) {
setSession(null);
setStatus("unauthenticated");
// Fetch token from Peable Auth

@@ -24,3 +26,10 @@ const response = await axios.post(config.SERVICES_URL + "/api/login", {

});
setSession(sessionResponse.data);
if (sessionResponse?.data) {
setSession(sessionResponse.data);
setStatus("authenticated");
}
else {
setSession(null);
setStatus("unauthenticated");
}
}

@@ -34,6 +43,5 @@ catch (error) {

}
setSession(null);
setStatus("unauthenticated");
}
finally {
setStatus("loaded");
}
};

@@ -40,0 +48,0 @@ loadSession();

{
"name": "@peable/services",
"version": "0.0.49",
"version": "0.0.50",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

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