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

@adastradev/user-management-sdk

Package Overview
Dependencies
Maintainers
24
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adastradev/user-management-sdk

Astra user management SDK for JavaScript in the browser and Node.js

  • 2.0.0-beta.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
243
decreased by-58.03%
Maintainers
24
Weekly downloads
 
Created
Source

user-management-sdk-js

Ad Astra user management SDK for JavaScript in the browser and Node.js

Tools

AuthManager (Class)

The AuthManager class can be used to:

Sign in a user through AWS's managed Cognito identity provider

.signIn( email, password, newPassword = '' ) => Promise -> CognitoUserSession

Used to obtain a CognitoUserSession.

Get federated IAM credentials to access AWS resources

.getIamCredentials() => Promise -> CognitoIdentityCredentials

Returns a promise which resolbes a refreshable CognitoIdentityCredentials object after signing in. Typically, you will want to set your global AWS-SDK config object's credentials key equal to this at the beginning of your session as follows:

import { config } from 'aws-sdk';

// Instantiate your AuthManager Instance

config.credentials = await authManagerInstance.getIamCredentials();
Refresh these credentials

.refreshCognitoCredentials() => Promise -> boolean

This will check if the credentials need refreshing using the credentials' .needsRefresh() method. If it does, it will refresh and resolve true. If it does not need refreshed, this will return false.

FAQs

Package last updated on 27 Aug 2019

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