friimaind / pi-hole-droid

Pi-hole Droid is an unofficial app that connects to your Pi-hole to show charts and statistics.
Apache License 2.0
127 stars 16 forks source link

Token as QR-Code #8

Closed DL6ER closed 7 years ago

DL6ER commented 7 years ago

If you are willing to implement this, I can look into adding a QR code (or something similar) on the settings page which can be used to transfer the password token painlessly to your app.

friimaind commented 7 years ago

QR code could be awesome, I would really appreciate it!

EDIT: I'm saving this https://www.npmjs.com/package/cordova-plugin-qrscanner here.

DL6ER commented 7 years ago

screenshot at 2017-02-20 12-18-27

Used password was/is:

Test
DL6ER commented 7 years ago

New QR code (less error-correction, (25% instead of 30%) with much faster generation):

screenshot at 2017-02-20 12-27-56

friimaind commented 7 years ago

That's good, I see that you pass also "WEBPASSWORD="

Do you think that it's possible to pass only the string after "=", so this:

WEBPASSWORD=123456

become this:

123456

DL6ER commented 7 years ago

Sure that is possible, I'd though about it as a security measure for you so people cannot scan just something. Let me know what you prefer.

friimaind commented 7 years ago

I think that you can pass only the string, there's no security problem on app side :+1:

SnaKKo commented 7 years ago

I suggest to use Google Charts:

https://developers.google.com/chart/infographics/docs/qr_codes

Example:

https://chart.googleapis.com/chart?chs=450x450&cht=qr&chl=123456&choe=UTF-8

DL6ER commented 7 years ago

Why use an external service for this when we can do everything locally?

New QR code: screenshot at 2017-02-20 12-37-21

DL6ER commented 7 years ago

PR: https://github.com/pi-hole/AdminLTE/pull/410

DL6ER commented 7 years ago

The pull request has been merged and the API token will be available with Pi-hole web interface v2.5 (to be released within the next few days).

friimaind commented 7 years ago

Thank you @DL6ER for the follow up!

friimaind commented 7 years ago

@DL6ER I've just released Pi-hole Droid 1.0.2 with QR Code scanner, thank you again for your help!