Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@storyous/auth

Package Overview
Dependencies
Maintainers
7
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storyous/auth

## Usage of saltAuth

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

auth

Usage of saltAuth

import { createSaltAuth } from '@storyous/auth';

const config = {
    identityBaseUrl: 'https://identity.cloud.saltpay.co',
    clientId: process.env.SALTID_CLIENT_ID,
    clientSecret: process.env.SALTID_CLIENT_SECRET,
    redirectUris: ['https://login.storyous.com/api/auth/salt-id-callback'],
};

// see @storyous/logger
const log = initLogger(config.env, config.logging).module('saltAuth');

const saltAuth = createSaltAuth(config, log);

// during application bootstrap
await saltAuth.init();

// authorize request to a service behind API Gateway
const accessToken = saltAuth.getAccessToken();
const headers = {
    'Authorization': `Bearer ${accessToken}`;
};

// get an additional OAuth client
const client = await saltAuth.createClient()

FAQs

Package last updated on 20 Feb 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc