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

Providing private, user-specific, to apps #6

Open
xtramural opened this issue Sep 26, 2016 · 1 comment
Open

Providing private, user-specific, to apps #6

xtramural opened this issue Sep 26, 2016 · 1 comment

Comments

@xtramural
Copy link

What’s the best way to provide apps with private, user-specific, information such as API keys, authentication tokens, and the like.

@joerick
Copy link
Member

joerick commented Sep 26, 2016

The functionality is available, via settings.json, but it's poorly documented at the moment. you can see the thought-process evolve in tingbot/tingbot-python#20

There's some documentation here on settings: https://tingbot-python.readthedocs.io/en/latest/settings.html

While the above documentation is functional, it doesn't say how settings should be used - we need to have a strong convention of how settings are used, and should document this somewhere.


This is how I imagine it works:

Users should distribute a default_settings.json with their app, which includes all the settings that can be set (and defaults where appropriate), and then a settings.json, which would contain settings (e.g. temperature_units) and sensitive information like API keys (e.g. yahoo_api_key). settings.json should be gitignored so those details don't become public when the app is shared.


Aside - local_settings.json is used for settings that are set from within the app itself. They should remain specific to the device. Our tooling (tbtool) explictly doesn't copy these when running or uploading to the Tingbot.

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