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

okta-bug-fix

v0.0.2

Published

This is a monorepo that contains Okta's OpenID Connect JavaScript resources.

Downloads

4

Readme

okta-oidc-js

This is a monorepo that contains Okta's OpenID Connect JavaScript resources.

build status

Table of Contents

Getting Started

We use Yarn as our node package manager during package development. To install Yarn, check out their install documentation.

# Clone the repo and navigate to it
git clone [email protected]:okta/okta-oidc-js.git
cd okta-oidc-js

# Install dependencies
yarn install

Packages

Monorepo

The okta-oidc-js repo is managed as a monorepo using Lerna. Each package within the monorepo is a separate npm module, each with its own package.json and node_modules directory.

Packages are parsed from the packages property in lerna.json, and adhere to this structure:

packages/
  configuration-validation
  jwt-verifier
  oidc-middleware
  okta-angular
  okta-react
  okta-react-native
  okta-vue

Versioning

We've configured Lerna with independent mode, which means that each package is required to manage its own version number.

Public packages

| Package | Status | Description | |--------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------| | configuration-validation | npm version | Standard pattern for validating configuration passed into Okta JavaScript libraries and SDKs. | | jwt-verifier | npm version | Easily verify JWTs from Okta | | okta-angular | npm version | Angular support for Okta | | oidc-middleware | npm version | Middleware to easily add OpenID Connect to the Node.js framework of your choice | | okta-react | npm version | React support for Okta | | okta-react-native | npm version | React Native support for Okta | | okta-vue | npm version | Vue.js support for Okta |

Configuration Reference

Each package is configured to look for environment variables based on the application type.

# Navigate into a specific package
cd packages/${packageName}

# Set the following environment variables
#
# ISSUER        - your authorization server
# CLIENT_ID     - the client ID of your app
# CLIENT_SECRET - the client secret of your app, required for the oidc-middleware package
# USERNAME      - username of app user, required for tests
# PASSWORD      - password of app user, required for tests
export ISSUER=https://{yourOktaDomain}/oauth2/default
...

Testing

Since the workspace contains libraries for Single-Page and Web Applications, you will need to have created a SPA and Web App in your Okta org.

Prerequisites

Create a SPA

  1. Applications > Add Application
  2. Select SPA
  3. Add the following login redirect URI:
    • http://localhost:8080/implicit/callback
    • http://localhost:8080/pkce/callback
  4. Click Done
  5. Users > Add Person
  6. Create and activate user

Create a Web App

  1. Applications > Add Application
  2. Select Web
  3. Add the following login redirect URI:
    • http://localhost:8080/authorization-code/callback
  4. Click Done
  5. Users > Add Person
  6. Create and activate user

Test an individual package

# Navigate into a specific package
cd packages/${packageName}

# Run the test suite
yarn test

Test all packages

Define the following environment variables at the project root and run the tests:

# Perform exports at the root of the repository
[okta-oidc-js]$ export ISSUER=https://{yourOktaDomain}/oauth2/default
[okta-oidc-js]$ export SPA_CLIENT_ID={SPAClientID}
[okta-oidc-js]$ export WEB_CLIENT_ID={webAppClientID}
[okta-oidc-js]$ export CLIENT_SECRET={webAppClientSecret}
[okta-oidc-js]$ export USERNAME={username}
[okta-oidc-js]$ export PASSWORD={password}

# Run all tests
[okta-oidc-js]$ yarn test

Contributing

We're happy to accept contributions and PRs! Please see the contribution guide to understand how to structure a contribution.