Comments (10)
Just had another close look and fixed that (sorry :)). I leave the field emtpy if no token is given. Nightscout users should be able to use it as it was.
from glance.
Background info:
If you open a Nightscout web site, then click on the menu (upper-right) and click on "Admin Tools", you will see all of the information related to "user names", "roles", "permissions", etc. Most people don't bother with this and thus anyone who knows their Nightscout website name will also be able to view all of their BG data. Most people are probably like me, figuring, "why would anyone care about someone else's BG data!" While I completely agree, there are also some people who are more security minded and simply don't want ANY of their information made public in all way. I understand this view, I'm just not paranoid enough to hold it myself!
If you setup some user names with assigned roles, the system will automatically create a "token" for you. (Honestly, I created tokens such a long time back that I don't remember if I needed to also configure the page to use them or if simply creating them was enough to turn them on.)
I have the following:
User Roles ...
blocked denied
raj admin
test readable
Once this is setup, you can easily use tokens by simply appending "token=TokenValue" to the URL.
So, instead of simply doing:
https://kkelebek.herokuapp.com/api/v1/entries.json?count=24
you would simply do:
https://kkelebek.herokuapp.com/api/v1/entries.json?count=24?token=value
where "value" is the token value I want to use.
from glance.
Perfect I will review this tonight :)
from glance.
@thomaas Reviewed and looks good! this will be on the pre-release soon :)
Thanks for the pull request!
from glance.
From Raj
I'll take a look at it, but really, supporting a token on the watch face side is really trivial. You just include "token=" (as I mentioned above), when you get data. That's it. My own watch faces always allows the end-user to configure the base nightscout URL (up to the ".com"), then they check to make sure there's no "/" on the end and remove it if so. They then allow the end-user to configure their token as a separate string. When I'm grabbing the URL to get some data, I actually put together what I need, then check and possibly add "?token=..." on the end. That's all. I'll add some info the ticket.
from glance.
@Rytiggy Could you please review my code changes. I will add the new settings field to the documentation.
from glance.
@thomaas Absolutely! With that PR did you make it optional and not a requirement to use the access token?
from glance.
Reopened.. Something seems wrong - the token settings are not pulled from the config site.
from glance.
This extension only seems to be intended for Nightscout configuration. As far as I understood it, the URL for custom settings should be as follows:
https://my.nightscout.site/pebble
Is this correct?
I've tested the access with the following URL, but it didn't work. Any ideas?
https://my.nightscout.site/pebble?token=glance-123456789
from glance.
@m-a-v try your URL formatted like this
https://{SITENAME}.{SITE}.com:{PORT}/pebble?token={TOKEN}&count=47
from glance.
Related Issues (20)
- E404 with nightscout
- Glance not working with sense HOT 5
- Diabox as Data Source
- Always On watchface? HOT 3
- No longer working with tomato HOT 3
- Glance not showing any values when pulling from xDrip which is in turn pulling from BYO Dexcom app HOT 2
- Feature Request - Separate thresholds for the graph and alarms
- Dexcom sensor error displays as zero, instead of as stale data
- E404 error HOT 1
- E500 error dexcom login on sense HOT 4
- Sense oxygen data on watchface?
- Missing trend direction HOT 1
- Fitbit Update: Glance stopped working for EU users HOT 1
- Stale data
- More Nightscout sources. HOT 4
- Dexcom stopped pulling data on 08/15/22
- FitBit Sence 2 data not pulling from Dexcom Database
- 404 and 401 errors HOT 9
- Fitbit Versa 4 Always-On is only 24-hr HOT 1
- E404 issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glance.