Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

grubtech-authentication-library

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grubtech-authentication-library

Authentication library for grub eco system

latest
npmnpm
Version
1.0.8
Version published
Maintainers
1
Created
Source

Authentication Library

Handles authentication on grub eco system

Installation

npm install @grubtech/auth-library

Usaged

aws-amplify needs an amplify configuration

const amplifyConfig = {
  Auth: {
    region: process.env.REACT_APP_AWS_REGION,
    identityPoolRegion: process.env.REACT_APP_IDENTITY_POOL_REGION,
    userPoolId: process.env.REACT_APP_USER_POOL_ID,
    userPoolWebClientId: process.env.REACT_APP_USER_POOL_WEB_CLIENT_ID,
  },
};

export default amplifyConfig;

Initiate an Authentication with the amplifier config

import {AuthenticationService} from '@grubtech/auth-library';
import amplifyConfig from "./amplifyConfig";

export const authObj = new AuthenticationService(amplifyConfig);

now use the 'authObj' as needed

import {authObj} from '../../../configs/authConfig';
const authResponse = await authObj.loginUser(values.email, values.password);

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Grubtech

FAQs

Package last updated on 22 May 2022

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