New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

apollo-link-token

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-link-token

--- title: Token Link ---

latest
Source
npmnpm
Version
1.0.0-beta.1
Version published
Maintainers
1
Created
Source

Purpose

An Apollo Link to setting auth token to headers before making a request.

Installation

npm install apollo-link-token --save

or Yarn yarn add apollo-link-token

Usage

import { TokenLink } from "apollo-link-token";

const link = new TokenLink({
  getValidTokenAsync: async () => {
    return null;
  },
});

Options

  • getValidTokenAsync: a async function call in every request to receving token from storage. You can do some stuff: check expires and refresh if need.

FAQs

Package last updated on 11 Nov 2017

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