javascript

@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({
    afterSignInUrl: "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.getUser();

// Sign out
authClient.signOut();

License

Licenses this source under the Apache License, Version 2.0 LICENSE, You may not use this file except in compliance with the License.