AuthKit JavaScript SDK
github.com
Official AuthKit SDK for JavaScript applications. The AuthKit JavaScript SDK provides a client-side library for integrating AuthKit authentication into vanilla JavaScript applications.
Refer to the AuthKit documentation for detailed usage instructions and examples.
Beta Versions
Certain WorkOS features may be available only in the beta version of the SDK. Beta versions have the-beta.* suffix, for example,
3.2.0-beta.1. For more information on how to use beta
versions, refer to the README in the GitHub repository.
This library can be used to interface with AuthKit in a client-side JavaScript application.
npm install @workos-inc/authkit-js
import { createClient } from "@workos-inc/authkit-js";
const authkit = await createClient("your-client-id");
const user = authkit.getUser();
const accessToken = await authkit.getAccessToken();