singpass-client
v1.0.0
Published
A JS/TS SDK for Singpass Auth
Downloads
2
Readme
singpass-client
singpass-client
is a lightweight client that helps your JS/TS backend to perform the Singpass Authentication flow.
Usage
- Install the package
npm install @ndisg/singpass-client
- Initialize your
SingpassClient
// In your backend
import { SingpassClient } from "@ndisg/singpass-client";
const singpassClient = SingpassClient.fromConfig({
clientId: "<YOUR-CLIENT-ID>",
clientSecret: "<YOUR-CLIENT-SECRET>",
redirectUri: "<YOUR-REDIRECT-URI>",
});
- You can now build a client assertion url with ease!
// In your backend
// URL object to be called to perform client assertion flow.
const clientAssertionUrl = await client.buildClientAssertionURL("test-code");