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

The 8base api token auth client for the AuthProvider.

Usage no npm install needed!

<script type="module">
  import 8baseWebApiTokenAuthClient from 'https://cdn.skypack.dev/@8base/web-api-token-auth-client';
</script>

README

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>