You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@36node/auth-sdk

Package Overview
Dependencies
Maintainers
4
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@36node/auth-sdk

36node auth sdk for auth service

2.12.0-pr-73-a499cd3dde
latest
npmnpm
Version published
Weekly downloads
50
-64.03%
Maintainers
4
Weekly downloads
 
Created
Source

auth-sdk-ts

Typescript auth sdk for 36node/auth service.

本工程是通过 @hey-api/openapi-ts 生成

配置 baseUrl 和 拦截器

import { client } from '@36node/auth-sdk';

// configure internal service client
client.setConfig({
  // set default base url for requests
  baseUrl: 'https://petstore3.swagger.io/api/v3',
  // set default headers for requests
  headers: {
    Authorization: 'Bearer <token_from_service_client>',
  },
});

client.interceptors.response.use((response) => {
  if (response.status === 200) {
    console.log(`request to ${response.url} was successful`);
  }
  return response;
});

FAQs

Package last updated on 19 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts