Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

@stelligent/universal-google-sso

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stelligent/universal-google-sso

This repository houses the source code for Stelligent's universal Google login workflow for the frontend of all our internal tools. It accomplishes two things:

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
-100%
Maintainers
3
Weekly downloads
 
Created
Source

Stelligent Universal Google SSO

This repository houses the source code for Stelligent's universal Google login workflow for the frontend of all our internal tools. It accomplishes two things:

  • Handles in-browser frontend authentication through Google
  • Deploys a tiny lambda that works with the frontend to return binary API keys

The goal is to have internal backends at Stelligent to work with binary API keys and avoid including Google auth logic in every single backend.

The project is a react component.

Getting Started (backend)

in your environment, define:

export BACKEND_APIKEY_SSM_PATH=<path to SSM String that contains the key>

in your terminal, execute:

npm run cdk deploy

Getting Started (frontend)

in your terminal, execute:

npm i --save @stelligent/universal-google-sso

in your environment, define:

export REACT_APP_GOOGLE_CLIENT_ID=<your Google project client ID>.apps.googleusercontent.com
export REACT_APP_LOGIN_LAMBDA_URL=<https URL of the API Gateway front of the lambda>

in your React frontend:

import React from 'react';
import StelligentLogin from '@stelligent/universal-google-sso'

export class MyCustomComponent extends React.Component {
  gotApiKey = key => {
    if (key) console.log(`Backend API key: ${key}`);
    else console.error('There was an error authenticating');
  }
  render() {
    return (<StelligentLogin onApiKey=${this.gotApiKey}>)
  }
}

Publishing to NPM

make sure you are authenticated to NPM, then execute:

npm publish --access=public

FAQs

Package last updated on 13 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts