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

@forgerock/javascript-sdk

v4.6.0

Published

ForgeRock JavaScript SDK

Downloads

36,675

Readme

npm (scoped) ForgeRock CI

The ForgeRock JavaScript SDK enables you to quickly integrate the ForgeRock Identity Platform into your client-side JavaScript apps.

Use the SDKs to leverage Intelligent Authentication in ForgeRock's Access Management (AM) product, to easily step through each stage of an authentication tree by using callbacks.

Requirements

  • ForgeRock Identity Platform

    • Access Management (AM) 6.5.2+
  • Browsers:

Tip: Older browsers (like IE11) may require multiple polyfills, which can be found in our documentation.

Installation

npm install @forgerock/javascript-sdk

Getting Started

To try out the ForgeRock JavaScript SDK, perform these steps:

  1. Setup CORS support in an Access Management (AM) instance.

    See Enabling CORS Support in the Documentation.

  2. Create an authentication tree in AM.

    See Creating a User Authentication Tree in the Documentation.

  3. Clone this repo:

    git clone https://github.com/ForgeRock/forgerock-javascript-sdk.git
  4. In the root folder of the repo, use NPM to install dependencies:

    npm install
  5. Build the ForgeRock JavaScript SDK:

    pnpm run build
  6. Open samples/embedded-login/index.html and edit the configuration values to match your AM instance.

  7. Serve the samples directory by using a simple HTTP server.

    • Run pnpm run start:samples
  8. Edit your /etc/hosts file to point your localhost (e.g. 127.0.0.1) to sdkapp.example.com

  9. In a supported web browser, navigate to https://sdkapp.example.com:8443, and then click Embedded Login.

Samples

ForgeRock provides these samples to help demonstrate SDK functionality/implementation. They are provided "as is" and are not official products of ForgeRock and are not officially supported.

  • Embedded login - /samples/embedded-login

    In most real-world scenarios, you will want to have full control over the UI. In these cases, you can use FRAuth to obtain typed callback instances from authentication trees and render the UI in whatever way makes sense for your application.

    You can run this sample app with the pnpm run start:samples command. Please see the Getting Started instructions for more details.

  • Central login - /samples/central-login

    In cases in which a centralized login application is desired, in contrast to an embedded login form, the SDK provides a method for leveraging an OAuth flow known as Authorization Code Flow (with PKCE). By using an option (login of "redirect") provided by TokenManager to request OAuth/OIDC tokens, when the user is not authenticated, the SDK will redirect the user to the configured login application with the ForgeRock platform. Once authenticated, the user will be redirected back to the original application to attain OAuth/OIDC tokens to complete the user flow.

    You can run this sample app with the pnpm run start:samples command. Please see the Getting Started instructions for more details.

  • React todos - /samples/reactjs-todos

    A sample React JS application is provided to demonstrate how the JavaScript SDK can be implemented within a React context. You can read more about this application by visiting its README.md file.

    Since this sample app uses npm's workspaces feature, npm 7 or higher is required. When on npm 7+, dependencies are already installed when running npm install. You can run this sample app with: npx nx run reactjs-todo:serve.

Documentation

Documentation for the SDKs is provided at https://sdks.forgerock.com, and includes topics such as:

  • Introducing the SDK Features
  • Preparing AM for use with the SDKS
  • API Reference documentation

Support

If you encounter any issues, be sure to check our Troubleshooting pages.

Support tickets can be raised whenever you need our assistance; here are some examples of when it is appropriate to open a ticket (but not limited to):

  • Suspected bugs or problems with ForgeRock software.
  • Requests for assistance - please look at the Documentation and Knowledge Base first.

You can raise a ticket using BackStage, our customer support portal that provides one stop access to ForgeRock services.

BackStage shows all currently open support tickets and allows you to raise a new one by clicking New Ticket.

Version History

Our version history can be viewed by visiting our CHANGELOG.md.

Contributing

If you would like to contribute to this project you can fork the repository, clone it to your machine and get started.

Be sure to check out our Coding Style and Guidelines page.

Disclaimer

This code is provided by ForgeRock on an “as is” basis, without warranty of any kind, to the fullest extent permitted by law. ForgeRock does not represent or warrant or make any guarantee regarding the use of this code or the accuracy, timeliness or completeness of any data or information relating to this code, and ForgeRock hereby disclaims all warranties whether express, or implied or statutory, including without limitation the implied warranties of merchantability, fitness for a particular purpose, and any warranty of non-infringement. ForgeRock shall not have any liability arising out of or related to any use, implementation or configuration of this code, including but not limited to use for any commercial purpose. Any action or suit relating to the use of the code may be brought only in the courts of a jurisdiction wherein ForgeRock resides or in which ForgeRock conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions.

License

This project is licensed under the MIT License - see the LICENSE file for details


© Copyright 2020 ForgeRock AS. All Rights Reserved.