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.45 to 0.0.46

4

dist/hooks/usePeableSession.d.ts

@@ -12,3 +12,5 @@ interface SessionData {

}
declare const usePeableSession: () => {
declare const usePeableSession: (config: {
SERVICES_URL: string;
}) => {
session: SessionData | null;

@@ -15,0 +17,0 @@ status: "loading" | "loaded";

import { useState, useEffect } from "react";
import axios from "axios";
const usePeableSession = () => {
const usePeableSession = (config) => {
const PEABLE_SERVICES_URL = process.env.PEABLE_SERVICES_URL;

@@ -14,3 +14,3 @@ const [session, setSession] = useState(null);

// Fetch token from Peable Auth
const response = await axios.post(PEABLE_SERVICES_URL + "/api/login", {
const response = await axios.post(config.SERVICES_URL + "/api/login", {
// Your login credentials (e.g., username, password)

@@ -22,3 +22,3 @@ });

// Session retrieval (as before)
const sessionResponse = await axios.get(PEABLE_SERVICES_URL + "/api/auth/session", {
const sessionResponse = await axios.get(config.SERVICES_URL + "/api/auth/session", {
withCredentials: true,

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

{
"name": "@peable/services",
"version": "0.0.45",
"version": "0.0.46",
"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