New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

auth-service-js

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth-service-js

library for auth service client

  • 1.0.0-rc.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-71.43%
Maintainers
1
Weekly downloads
 
Created
Source

Auth Service JS Client

Library for Auth JWT Service.

How to contribute

  • clone repository
  • install dependencies npm install
  • use npm run test:watch to run test with --watch mode
  • use npm run build to build library

Please, pay special attention: as far as we have a lack of abilities to publish private npm package for free to use auth-service-js please run npm link ../auth-service-js in your main project.

How to use

Autentificate user by Bitrix cookies

/*eslint-disable */
import authService from 'auth-service-js';

// initialize client with http client and base url, i.e. http://localhost:3000
const service = authService(http, 'http://localhost:3000');
// get JWT token
service.getTokenByCookies({
  BX_USER_ID: '111', // you should get BX_USER_ID from cookie
  PHPSESSID: '222', // you should get PHPSESSID from cookie
});
/* eslint-enable */

Refresh token

/*eslint-disable */
import authService from 'auth-service-js';

// initialize client with http client and base url, i.e. http://localhost:3000
const service = authService(http, 'http://localhost:3000');
// refresh JWT token
service.refreshToken(token);
/* eslint-enable */

FAQs

Package last updated on 23 Aug 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

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