Support new multidevice authentication #63
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's changelog time after many months. So, there was no plan to add the MultiDevice Beta feature, but legacy authentication was removed by WhatsApp. Some people told me almost all WhatsApp bots are broken and require a persistence server, but I challenged that.
Technically speaking
whatsapp-web.js
pulls the whole state from Chrome to remember the device. That's good, but the only limitation is it needs a persistence server. So, I delete large unneeded files, make a zip of it, and encrypt the zip, so the file can be hosted from any website (likehttps://thetuhin.com/session.secure
).Changelog
What about security?
Well, it is safe, but still, maybe there is some vulnerability of the token encryption (like brute force, social engineering). So I highly recommend you to throw this stuff in a secure place (like
https://thetuhin.com/freaking-hard-security/session.secure
)The new process
Well, it is kinda same. Just follow these steps:
npm run gentoken
, it will ask you for a password (SESSION_KEY). With dockerdocker run -p 8080:8080 -it jeeetpaul/whatsbot-session
session.secure
has been created in the root directory.SESSION_KEY
with the Chosen Password in env. Please don't putSESSION_URL
in that case.session.secure
to any server, like a public Github repo. Then grab the direct link of it. Put then link intoSESSION_URL
Thank you 👍