unbound-auth
v0.2.1
Published
Javascript auth client for Unbound.
Readme
unbound-auth
JavaScript auth client for Unbound.
Unbound is a stateless authentication broker. It lets developers add auth without extra signup or complicated setup, and lets users sign in with the provider they choose. User data is stored fully on the user's device, and only passes through the server for processing, never stored on server.
This client package helps simplify adding Unbound to your app. Works in the browser, as an SPA, or on the server.
[!WARNING] This project is still in alpha. While the functionality should work, there might be some bugs or DX that doesn't quite feel right yet.
Installation
# npm/pnpm/bun/yarn
npm install unbound-authIf using this script directly in the browser, add this to your site:
<script src="https://unpkg.com/unbound-auth@latest/dist/unbound.min.js"></script>Getting Started
import { createUnboundClient } from "unbound-auth";
const auth = createUnboundClient();
auth.startSignIn();
await auth.finishSignIn();
const user = auth.user;