speakeasyjs / speakeasy

**NOT MAINTAINED** Two-factor authentication for Node.js. One-time passcode generator (HOTP/TOTP) with support for Google Authenticator.
MIT License
2.68k stars 229 forks source link

Object.create() clears the options from `totp` method #106

Closed amreladawy closed 6 years ago

amreladawy commented 6 years ago

When using the totp the passed options are cleared when they are cloned. options = Object.create(options);

speakeasy.totp({ secret: 'ir6jqgomwnldmrhn', encoding: 'base32'})

I am using it in an Angular 5 app.