0.0.1 • Published 5 months ago

@asgardeo/javascript v0.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

Installation

# Using npm
npm install @asgardeo/javascript

# or using pnpm
pnpm add @asgardeo/javascript

# or using yarn
yarn add @asgardeo/javascript

Quick Start

import { AsgardeoAuth } from "@asgardeo/javascript";

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

// Handle authentication
auth.signIn()
    .then(() => {
        // Handle successful sign in
    })
    .catch((error) => {
        // Handle sign in error
    });

// Get authenticated user
auth.getBasicUserInfo()
    .then((userInfo) => {
        console.log(userInfo);
    });

// Sign out
auth.signOut();

License

Apache-2.0

0.0.1

5 months ago