@ssasy-auth/extension
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

ssasy extension bridge

ssasy-ext is a browser extension that offers a secure, usable and scalable alternative to existing password and federation-based user authentication schemes.

The bridge component abstracts the complex logic that web applications would need to implement if they were to communicate with the ssasy-ext. The absraction encompasses:

  • the interface for messages (see interface.ts)
  • the logic for sending and receiving messages (see bridge.ts)

usage

import { Bridge } from 'ssasy-ext-bridge';

// check if the extension is installed
const extensionInstalled: boolean = await Bridge.isExtensionInstalled(); // returns true or false

if(extensionInstalled === true){

  const requestMode: string = 'login'; // or 'registration'
  
  // request the user's public key
  const publicKey: string = await Bridge.requestPublicKey(requestMode); // returns the user's public key

  // ... generate a challenge with the user's public key 

  // initiate challenge-response
  const challengeResponse: string = await Bridge.requestChallengeResponse(requestMode, challenge); // returns the challenge response

  // ... verify the challenge response
}

Readme

Keywords

none

Package Sidebar

Install

npm i @ssasy-auth/extension

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

18.8 kB

Total Files

11

Last publish

Collaborators

  • this-oliver