@8base/api-token-auth-client
TypeScript icon, indicating that this package has built-in type declarations

1.6.2 • Public • Published

8base api token auth client

The 8base api token auth client for the AuthProvider.

ApiTokenAuthClient

Table of Contents

ApiTokenAuthClient

Create instance of the api token auth client

Parameters

  • apiToken string Api Token generated in 8base app.
    • apiToken.apiToken

Usage

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

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

  ...

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

Readme

Keywords

none

Package Sidebar

Install

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

Weekly Downloads

619

Version

1.6.2

License

MIT

Unpacked Size

6.9 kB

Total Files

11

Last publish

Collaborators

  • dav1nx1
  • jorge.osorio
  • 8base-bot