This package has been deprecated

Author message:

This package was moved to @8base/api-token-auth-client package. Use it instead.

@8base/web-api-token-auth-client

0.9.2 • Public • Published

8base web api token auth client

The 8base api token auth client for the AuthProvider.

WebApiTokenAuthClient

Table of Contents

WebApiTokenAuthClient

Create instacne of the api token auth client

Parameters

  • apiToken string Api Token generated in 8base app.

Usage

import { AuthContext, AuthProvider, type AuthContextProps } from '@8base/auth';
import { WebApiTokenAuthClient } form '@8base/web-api-token-auth-client';

  const authClient = new WebApiTokenAuthClient({
    apiToken: 'api-token',
  });

  ...

  <AuthProvider authClient={ authClient }>
    ...
      <AuthContext.Consumer>
        {
          (auth: AuthContextProps) => (<div />)
        }
      </AuthContext.Consumer>
    ...  
  </AuthProvider>

Readme

Keywords

none

Package Sidebar

Install

npm i @8base/web-api-token-auth-client

Weekly Downloads

2

Version

0.9.2

License

MIT

Unpacked Size

10.4 kB

Total Files

8

Last publish

Collaborators

  • dav1nx1
  • jorge.osorio
  • 8base-bot