SCRAM Client Javascript implementation/example/library?

1.1k Views Asked by At

Few months ago I've created a small Java library that provides functionality for both client and server. Yesterday one of its users asked me for an example how to implement a SCRAM login on his web site on the client, i.e. browser (he already uses SCRAM on the server side using my lib). He told me that he was unable to find any Javascript example or library and my search was also unsuccessful (which truly amazed me, I thought that SCRAM is used more widely now in the light of all the data breaches and stoled login credentials).

Are you aware of such examples or library (javascript) that can be used in a browser to provide the client functionality of SCRAM authentication?

1

There are 1 best solutions below

0
On BEST ANSWER

You may want to take a look at SAZZLE

SAZZLE is a pure JavaScript library for the Simple Authentication and Security Layer (SASL). The goal is to provide a simple promised-based framework for processing SASL challenges and responses.

This library includes built-in support for PLAIN and SCRAM-SHA1, while additional (or alternative) mechanisms can be added as needed.

Being a pure-javascript, you should be able to use it on web with Browserify (although I've not tried it myself)..