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

react-oly-gate

v3.5.6

Published

Olympusat React Gate

Downloads

28

Readme

Npm: https://www.npmjs.com/package/react-oly-gate

Usage

To add the Authentication gate and the Centralizer to your project:

  1. Include the oly-sdk & react-oly-gate package
  2. Import the Gate & instantiate it with your branding info and credentials
npm i -S oly-sdk react-oly-gate
  import {Oly} from '@olympusat/oly-sdk';
  import {Gate} from '@olympusat/react-oly-gate';

  import getOlySdkOptions from "./olySdkOptions";
  import getOlyGateOptions from "./olyGateOptions";

  new Oly(getOlySdkOptions());
  new Gate(getOlyGateOptions());

Referrer

If a referrer is set in localstorage, then the sdk will redirect to that url on login.localStorage.setItem('olyauth.referrer',window.location.href);

APP_CLIENT_ID

This is the Id of your User Pool

USER_POOL_ID

The Id of the User Pool in Cognito that you'd like to use

IDENTITY_POOL_ID

The Id of the Federated Identities Pool set up in Cognito. The APP_CLIENT_ID & USER_POOL_ID of your User Pool should be added as Cognito Authentication Providers in the Federated IDentity Pool settings.

##ENDPOINT_USERS The GraphQL endpoint for your users service.

ENDPOINT_APPS

The GraphQL endpoint for your apps service.

Resources

Requirements

The application must have a route named "auth" that will be used as our callback and a safe route to host the Gate component

Features

Notes: The auth services works through the Users api. There are public methods in the auth service that the user service triggers on load to reveal the auth gate.

utils.OlyAuthMeta is where you theme the auth gate from.

Gotchas

If you run into issues, first check that these packages are exactly these versions. AWS changed their sdk at some point after, introducing breaking changes

"aws-sdk":"2.7.9",
"amazon-cognito-identity-js":"1.8.0"