npm

@authsignal/nextjs-helpers
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

Authsignal Next.js helpers

Installation

Add the @authsignal/nextjs-helpers package to your package.json.

npm

npm install @authsignal/nextjs-helpers

yarn

yarn add @authsignal/nextjs-helpers

Usage

Wrap your top level app component with AuthsignalProvider:

import {AuthsignalProvider} from "@authsignal/nextjs-helpers";

function MyApp({Component, pageProps}: AppProps) {
  return (
    <AuthsignalProvider>
      <Component {...pageProps} />
    </AuthsignalProvider>
  );
}

Then you can use the useAuthsignal hook to access the Authsignal browser client:

import {useAuthsignal} from "@authsignal/nextjs-helpers";

function MyPage() {
  const authsignalClient = useAuthsignal();
}

Learn more about the Authsignal browser client in the API documentation.

Package Sidebar

Install

npm i @authsignal/nextjs-helpers

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

5.68 kB

Total Files

11

Last publish

Collaborators

  • hwhmeikle
  • chrisfisheras
  • justinsoong