FSL ID Documentation
  • Overview of FSL ID
    • What is FSL ID?
  • Guides
    • Setup an FSL ID
  • Developers
    • Join as a Developer
    • FSL ID SDK
    • Univeral Login
    • Interact with Wallet
    • Reputation Score
      • Upload Reputation Score
      • Retrieve Reputation Score
    • Grant Scope
Powered by GitBook
On this page
  • JS SDK
  • How to install
  • Getting Started
  1. Developers

FSL ID SDK

PreviousJoin as a DeveloperNextUniveral Login

Last updated 5 months ago

JS SDK

Compatible with browser, app integration.

How to install

Use npm to install the JS SDK, check for details

Getting Started

Demo code to integrate with the JS SDK

import { FSLAuthorization } from 'fsl-authorization';

const fslAuthorization = window.FSLAuthorization.init({
  responseType: 'code', // 'code' or 'token'
  appKey: 'Your APP KEY',
  redirectUri: 'Your Redirect URL', // https://xxx.xxx.com
  scope: 'basic,wallet', // Grant Scope
  state: 'test',
  usePopup: true // Popup a window instead of jump to
});

fSLAuthorization.signIn().then((code) => {
  if (code) {
    // Implement your code here
  }
});

https://www.npmjs.com/package/fsl-authorization