Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#581: Increasing QR code timeout ttl #584

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

deven96
Copy link

@deven96 deven96 commented Jun 27, 2021

No description provided.

@AlmogBaku
Copy link
Contributor

The timeout of the QR is derived from the response. You can't just configure it as you wish :O

@deven96
Copy link
Author

deven96 commented Jul 16, 2021

The timeout of the QR is derived from the response. You can't just configure it as you wish :O

Oh really... the timeout may be more than 20 seconds specified in the response then because I've tried logging in after the 1 minute mark using the PR and it worked @AlmogBaku

@AlmogBaku
Copy link
Contributor

AlmogBaku commented Jul 17, 2021

Maybe it's still valid for a while after the TTL, but there is no way to ensure that.
The best way to handle it is to refresh the QR code.

This is also the way Whatsapp web behave - refreshing the QR every 20 seconds

@deven96
Copy link
Author

deven96 commented Jul 19, 2021

Maybe it's still valid for a while after the TTL, but there is no way to ensure that.
The best way to handle it is to refresh the QR code.

This is also the way Whatsapp web behave - refreshing the QR every 20 seconds

I see what you mean. To that regard, is there anyway to get that refresh without exiting the terminal. The project I intend to use this for doesn't ensure scan will happen after 20 seconds

@AlmogBaku
Copy link
Contributor

You need to build it on your own. For production use-cases it's better to use a different "qr encoding" mechanism.
I built mine with skip2/go-qrcode and gorilla/websocket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants