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

tymly-auth-auth0-plugin

v0.0.3

Published

Provides auth0 authentication functionality

Downloads

2

Readme

tymly-auth-auth0-plugin

JavaScript Style Guide license

Provides auth0 utility functionality to the TymlyJS platform

Install

$ npm install tymly-auth-auth0-plugin --save

Once installed, you will need to go to the auth0 management interface and create a new client (type: non-interactive). On the settings screen, make a note of the DOMAIN, CLIENT ID and the CLIENT SECRET (these three values will need to be setup in three environment variables, respectively TYMLY_NIC_AUTH0_DOMAIN, TYMLY_NIC_AUTH0_CLIENT_ID and TYMLY_NIC_AUTH0_CLIENT_SECRET).

Scroll down to the bottom of the page and click the Show Advanced Settings link. Click the Grant Types tab and ensure that IMPLCIT, AUTHORIZATION CODE, REFRESH TOKEN and CLIENT CREDENTIALS grants are all ticked.

Finally, on the left-hand side of the screen, click on the APIs link. Click on the Auth0 Management API link. Click on the Non Interactive Clients tab. After a few moments, a list of clients will be displayed - find the non-interactive client you just created and switch the toggle next to it to the Authorized position. Finally, in the clients scopes, find the scope "read:users", tick it and click the update button.

Proxy Configuration

It should be obvious, but please note that this plugin makes calls to various web APIs. If you are behind a firewall which, you may optionally set the PROXY_URL environment variable. This url will should look something like 'http://[USERNAME]:[PASSWORD]@[PROXY HOST]:[PROXY PORT]'.

Note that if your on a Active Directory network, your username may need to be prefixed with a domain, followed by the three characters '%5C', to separate the domain from the username.

So for example, if your domain is called 'WORLD', your username is 'j.smith', your password is 'superhero', your proxy host is 'proxy.world.net' and your proxy port is 1234, your proxy url would look like "http://world%5Cj.smith:[email protected]:1234".

Tuning

The service makes use of a cache so that expensive HTTP requests are kept to a minimum.

  • By default, the size of this cache is 500, but this can be overridden via the (optional) TYMLY_USER_CACHE_SIZE environment variable.
  • By default, entries in the cache have a lifetime of 30 minutes, but this can be overridden via the (again optional) TYMLY_USER_CACHE_MAX_AGE_IN_MS environment variable.
  • By default, when invoking external web API calls, a timeout is set to 3 seconds, but this can be overridden via the (optional, yet again) WEB_API_TIMEOUT_IN_MS environment variable.

Testing

Before running the tests (and indeed, using the utility functions the service provides), you'll need to set the following environment variables.

TYMLY_NIC_AUTH0_DOMAIN=abc.de.auth0.com
TYMLY_NIC_AUTH0_CLIENT_ID=abc...
TYMLY_NIC_AUTH0_CLIENT_SECRET=abc...

Once the environment variables have been set, you can run the tests like this:

$ npm test

License

MIT