npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ibmcloud-appid-js

v1.0.2

Published

IBM Cloud App ID SDK for Single Page Applications

Downloads

3,228

Readme

IBM Cloud powered Coveralls Version DownloadsMonthly DownloadsTotal License

GithubWatch GithubStars GithubForks

IBM Cloud App ID JavaScript SDK

Client-side javascript SDK for the IBM Cloud App ID service to use with single-page applications created in Angular, React, or other frontend frameworks. Read the documentation for information on getting started with IBM Cloud App ID and single-page applications. Apps using Node.js should use our server-side SDK.

Table of Contents

Installation

Using npm:

npm install ibmcloud-appid-js
import AppID from 'ibmcloud-appid-js';

From the CDN:

<script src="https://cdn.appid.cloud.ibm.com/appid-1.0.1.min.js"></script>

Or for development purposes use the minified file in this repo:

<script type='text/javascript' src="dist/appid.min.js"></script>

Getting Started

A sample application can be found in the sample folder in this repo.

You will need an IBM Cloud App ID instance with a singlepageapp application created. Apps using Angular, React, or other frontend frameworks will require a specific type of credentials to use with IBM Cloud App ID. Visit the docs to learn more about creating application credentials.

Use the clientId and discoveryEndpoint from the application credentials to initialize the AppID instance.

const appID = new AppID();
await appID.init({
    clientId: '<SPA_CLIENT_ID>',
    discoveryEndpoint: '<WELL_KNOWN_ENDPOINT>'
});

Using the signin() in your app to start authentication:

document.getElementById('login').addEventListener('click', async () => {
    try {
        const tokens = await appID.signin();
    } catch (e) {
        ...
    }
});

Read the documentation for information about getting started with IBM Cloud App ID Service.

API Reference

Checkout our API reference here.