web-ui-sdks

@asgardeo/browser

Browser-based SDK for Asgardeo

npm (scoped) npm License

Installation

# Using npm
npm install @asgardeo/browser

# or using pnpm
pnpm add @asgardeo/browser

# or using yarn
yarn add @asgardeo/browser

Quick Start

import { AsgardeoAuthClient } from "@asgardeo/browser";

// Initialize the auth client
const authClient = new AsgardeoAuthClient({
    signInRedirectURL: "https://localhost:3000",
    clientID: "<your_client_id>",
    baseUrl: "https://api.asgardeo.io/t/<org_name>"
});

// Sign in
authClient.signIn();

// Get user info after authentication
const userInfo = await authClient.getBasicUserInfo();

// Sign out
authClient.signOut();

License

Apache-2.0