Giter Club home page Giter Club logo

Comments (10)

thomaas avatar thomaas commented on May 12, 2024 2

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.

rajid avatar rajid commented on May 12, 2024 1

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.

Rytiggy avatar Rytiggy commented on May 12, 2024 1

Perfect I will review this tonight :)

from glance.

Rytiggy avatar Rytiggy commented on May 12, 2024 1

@thomaas Reviewed and looks good! this will be on the pre-release soon :)

Thanks for the pull request!

from glance.

Rytiggy avatar Rytiggy commented on May 12, 2024

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.

thomaas avatar thomaas commented on May 12, 2024

@Rytiggy Could you please review my code changes. I will add the new settings field to the documentation.

from glance.

Rytiggy avatar Rytiggy commented on May 12, 2024

@thomaas Absolutely! With that PR did you make it optional and not a requirement to use the access token?

from glance.

thomaas avatar thomaas commented on May 12, 2024

Reopened.. Something seems wrong - the token settings are not pulled from the config site.

from glance.

m-a-v avatar m-a-v commented on May 12, 2024

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.

Rytiggy avatar Rytiggy commented on May 12, 2024

@m-a-v try your URL formatted like this
https://{SITENAME}.{SITE}.com:{PORT}/pebble?token={TOKEN}&count=47

from glance.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.