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

@tfso/js-auth

v3.3.2

Published

## config

Downloads

190

Readme

js-auth

config

The config object looks like this:

export interface AuthenticatorConfig{
    optionsAuth0: {
        clientID: string              // Default: 'INGoYuDZDgaxT8JOL64M7vnJcxEGxCi0',
        domain: string                // Default: 'login.24SevenOffice.com',
        configurationBaseUrl: string  // Default: 'tfso.eu.auth0.com'
    }
    identityApiUrl: string            // Default: 'https://identity.api.24sevenoffice.com',
    loginUrl: string | (() => string) // Default: () => `/login/?returnUrl=${encodeURIComponent(window.location.origin + window.location.pathname)}`,
    callbackUrl: string               // Default: `${window.location.origin}/login/auth0/callback.html?isSilent=true`
}

See src/defaultConfig.js for defaults. The defaults will work in prod.

Notes:

  • callbackUrl must be on the same origin as the application. This is because the callback page is opened inside an iframe, which will contain url parameters with authz data. The url parameters are only available on the same origin.
  • loginUrl can be a string or a function. The reason to use a function is if you want to dynamically set the returnUrl.

About login:

  • When logging in, the page is redirected to the prod login page. After login, this page redirects to the prod callback page. This page is setup to read url params, and setup a backwards compatible session cookie. However, the same callback page can also be used with the isSilent url param to skip all the extra work. This is used when doing silent authentication, which is what the authorizer in this package does.

Publishing Development/Prerelease Package for testing

To publish a development or prerelease package, follow these steps:

  1. Include #deploy_branch in your commit message.
  2. Once the workflow is complete, navigate to GitHub Packages for js-auth.
  3. In the "Recent Versions" section, select the latest version.
  4. Identify the version number associated with the latest release; this is the version you can use for testing the package.

Now you're ready to test the prerelease package with the specified version number.