https://github.com/picahq/authkit
Frontend bindings for AuthKit powered by Pica
https://github.com/picahq/authkit
authkit integrations pica
Last synced: 4 months ago
JSON representation
Frontend bindings for AuthKit powered by Pica
- Host: GitHub
- URL: https://github.com/picahq/authkit
- Owner: picahq
- Created: 2023-04-14T18:43:56.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-16T17:22:23.000Z (4 months ago)
- Last Synced: 2025-01-25T18:17:18.799Z (4 months ago)
- Topics: authkit, integrations, pica
- Language: TypeScript
- Homepage: https://docs.picaos.com/authkit
- Size: 436 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# authkit
Hook and components for integrating with [Pica AuthKit](https://docs.picaos.com/authkit). Compatible with React, Next.js, Vue, Svelte and more.
## Install
With npm:
```jsx
npm i @picahq/authkit
```With yarn:
```jsx
yarn add @picahq/authkit
```## Using the AuthKit component
You'll want to replace the `token URL` with your token endpoint URL, which can be securely generated from your backend using Pica's [AuthKit Node](https://www.npmjs.com/package/@picahq/authkit-node) library.
```jsx
import { useAuthKit } from "@picahq/authkit";const { open } = useAuthKit({
token: {
url: "https://api.your-company-name.com/authkit-token",
headers: {},
},
onSuccess: (connection) => {},
onError: (error) => {},
onClose: () => {},
});
```## Full Documentation
Please refer to the official [Pica AuthKit](https://docs.picahq.com/authkit) docs for a more holistic understanding of Pica AuthKit.