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

Show QR code with url, username and password #179

Open
mueller-ma opened this issue Apr 6, 2018 · 5 comments
Open

Show QR code with url, username and password #179

mueller-ma opened this issue Apr 6, 2018 · 5 comments

Comments

@mueller-ma
Copy link
Member

A user wants to be able to scan a QR code provided in openhab cloud to configure a client: openhab/openhab-android#721

@FlorianSW
Copy link
Member

How would the format look like? Generating a QR code should be fairly easy. However, we're not saving the user's password in plain text (and that's correct in that way :P), so the user would still need to enter their password manually :)

@mueller-ma
Copy link
Member Author

The QR code can represent a string, e.g. url=https://myopenhab.org&mail=foo@example.com&pw=1234.
The password can be entered by the user in a password field that is only used to generate the qr clientside via js and the password is thrown away afterwards. I would still prefer this over having to type the password on my smartphone.

@FlorianSW
Copy link
Member

FlorianSW commented Apr 22, 2018

Ok, makes sense. We would need to add a note to the QR Code, that the code shouldn't be saved as it contains the password in plain text to be transferred to the device.

As a separator for the parts (url, username, password) we would need to find a usable one, especially because there're no blacklisted chars for the username so far, iirc (even if we say, that it must be a valid e-mail address).

@digitaldan Can you maybe look at the DB and check, if there's any username containing a & sign in it? If not, we could blacklist this one for registering a new account and use this as a separator :)

@mueller-ma
Copy link
Member Author

mueller-ma commented May 6, 2018

Do you think it would be useful to add parameters to the qr code to configure everything in the app, e.g. icon format?

@FlorianSW
Copy link
Member

I wouldn't add too much things that can be configured with the QR code. As a user I would expect the QR code to be used to "pair" my device with the currently logged in openHAB-cloud instance, so url, username and passwort should be enough.

If we take settings into the QR code the question would be: What settings would be included and what, if the user already changed one of these, are the values overwritten? I don't think, that this is something someone would expect at all in a QR code :)

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

No branches or pull requests

2 participants