Skip to content
Gerald Yeo edited this page Mar 10, 2019 · 1 revision

Table of Contents


API Changes

As suggested in #126, the keyuri utility now uri-encodes the user and service parameters.

Previously in v10.x.x and below:

// v10.x.x and below
const otpauth = otplib.authenticator.keyuri(
    encodeURIComponent(user), encodeURIComponent(service), secret);

In v11.x.x

// v11.x.x and above
const otpauth = otplib.authenticator.keyuri(user, service, secret);
Clone this wiki locally