0.1.2 • Published 2 years ago

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

Weekly downloads
-
License
-
Repository
-
Last release
2 years 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

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.3

2 years ago

0.0.4

2 years ago

0.0.2

3 years ago

0.0.1

3 years ago