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

cloudbase-accesstoken-cache

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudbase-accesstoken-cache

cloudbase-accesstoken-cache , use cloudbase database to manager your accesstoken easily !

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

cloudbase-accesstoken-cache

轻松快捷的管理您的 Access Token

Usage

import { init } from '@cloudbase/node-sdk'
import { SingleCacheManager } from 'cloudbase-accesstoken-cache'

const app = init({
  secretId,
  secretKey,
  env
})

const db = app.database()
const manager = new SingleCacheManager({
  appid,
  db,
  secret
})
// 这就是你的 token 带了一套缓存机制
const token = await manager.getAccessToken()
const tcb = require('@cloudbase/node-sdk')
const { SingleCacheManager } = require('cloudbase-accesstoken-cache')

const app = tcb.init({
  secretId,
  secretKey,
  env
})

const db = app.database()
const manager = new SingleCacheManager({
  appid,
  db,
  secret
})
// 这就是你的 token 带了一套缓存机制
const token = await manager.getAccessToken()

Options

SingleCacheManager

都可以通过 .d.ts 定义感知出来

如果你有更复杂的需求,请提 issue

Keywords

FAQs

Package last updated on 17 Nov 2021

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

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