safe-usemultiauthstate
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published
safe-multiauthstate
-------------------

It's a modified original .useMultiAuthState() code to encrypt your session data.

But, why should we encrypt our session data?
Sometimes, we host our whatsapp bots on hosting platforms (e.g. Heroku, and Railway)
And, we need to rescan the QR to login. I thought, it was very complicated.

So, with this module. You can save your session publicly. However, you need to specify a secret key to encrypt/decrypt your session data.

I think, it's not a best practice to secure your session data. But, this is only an alternative.

------

Example

import { useSafeMultiAuthState, generateKey } from 'safe-usemultiauthstate';

// generateKey is an alias for scrypt(pwd, salt, keylen, ...)
const key = generateKey('secret key', 'salt');

const state = await useSafeMultiAuthState(key, 'folder');

Package Sidebar

Install

npm i safe-usemultiauthstate

Weekly Downloads

16

Version

1.2.1

License

MIT

Unpacked Size

15 kB

Total Files

13

Last publish

Collaborators

  • hanifdwypoetras