0.1.2 • Published 12 months ago

@hipsquare/use-access-code-identifier v0.1.2

Weekly downloads
-
License
-
Repository
-
Last release
12 months ago

@hipsquare/use-access-code-identifier

A hook that identifies a query parameter called strapiOidcToken in browser and Capacitor environments. It seamlessly handles detecting if the user is in a browser or a Capcaitor. For browser apps, it uses the current URL's query parameters. For Capacitor apps, it tries to find launch parameters and parse it from there.

Once the token is identified is is stored in local storage.

Installation

yarn add @hipsquare/use-access-code-identifier

Usage

import { usestrapiOidcTokenIdentifier } from "@hipsquare/use-access-code-identifier";
const { strapiOidcToken, logout } = usestrapiOidcTokenIdentifier();

useEffect(
  () => console.log("Access token identified: ", strapiOidcToken),
  [strapiOidcToken]
);
0.1.0

12 months ago

0.1.2

12 months ago

0.1.1

12 months ago

0.0.3

1 year ago

0.0.4

1 year ago

0.0.2

2 years ago

0.0.1

2 years ago