Socket
Book a DemoInstallSign in
Socket

bsso

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bsso

Bloomberg SSO js utilities

1.1.0
latest
Source
npmnpm
Version published
Weekly downloads
62
-25.3%
Maintainers
1
Weekly downloads
 
Created
Source

Bloomberg SSO js utilities

NPM Version Build Status Code Climate Test Coverage

Install

yarn add bsso

! Usage with react native !

First setup react-native-get-random-values andreact-native-url-polyfill and text-encoding.

Simple Usage

import { BSSO } from 'bsso';

const bsso = new BSSO({
  clientId: 'se-mobile-app',
  redirectUri: 'http://localhost:8080/'
});

const tokenFromRedirectUrl = new URLSearchParams(window.location.hash).get('#token');
	
if (tokenFromRedirectUrl) {
  // if we have #token, we are ready for redirect
  console.log('redirect');
  window.location.replace(await bsso.getRedirectURL(tokenFromRedirectUrl));
} else {
  const code = new URLSearchParams(window.location.search).get("code");

  if (code) {
    // if we have the code, we are ready to continue getting token for authorization
    const activeToken = await bsso.getToken(code);
    console.log('activeToken', activeToken);
  }
}

BSSO API

MethodArgumentsReturn
getTokencode?: stringstring
isExpiredboolean
getRedirectURLtoken: string, scope?: stringstring
toJSONobject

Keywords

bsso

FAQs

Package last updated on 11 Aug 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.