Skip to content

4) get login from env every time#63

Merged
sam-watttime merged 2 commits into
mainfrom
improve-login-handling
Apr 20, 2026
Merged

4) get login from env every time#63
sam-watttime merged 2 commits into
mainfrom
improve-login-handling

Conversation

@jcofield

@jcofield jcofield commented Nov 2, 2025

Copy link
Copy Markdown
Contributor

What

Read login credential from os.environ every time

Why

This will reduce the surface area of credentials to only the process's os.evniron

How

Read directly from os.enrion every time a credential is necessary, e.g. the first login or to refresh a token.

@sam-watttime

Copy link
Copy Markdown
Contributor

I worry that some users will not be sophisticated enough to set environment variables (e.g. windows power shell) we should check in with @geoffhancock to gauge this.

Comment thread watttime/api.py
Comment thread watttime/api.py
@geoffhancock

geoffhancock commented Nov 3, 2025

Copy link
Copy Markdown
Collaborator

I worry that some users will not be sophisticated enough to set environment variables (e.g. windows power shell) we should check in with @geoffhancock to gauge this.

I would guess it is a mix, and even if a majority know how, it is unlikely that everyone knows how to do it. It is actually quite easy to do in Windows, but not everyone has necessarily been exposed to it. Requiring it might be asking too much, but I like the approach of allowing both ways and nudging toward using envars.

@jcofield

jcofield commented Nov 3, 2025

Copy link
Copy Markdown
Contributor Author

I worry that some users will not be sophisticated enough to set environment variables (e.g. windows power shell) we should check in with @geoffhancock to gauge this.

I would guess it is a mix, and even if a majority know how, it is unlikely that everyone knows how to do it. It is actually quite easy to do in Windows, but not everyone has necessarily been exposed to it. Requiring it might be asking too much, but I like the approach of allowing both ways and nudging toward using envars.

The intent here is to not change behavior at all but to reduce the surface area over which these parameters exist. If it cannot be done with this approach my next approach will be to try the system keyring. As a last resort, I would suggest we revisit this discussion and explore changing this functionality.

@jcofield jcofield force-pushed the improve-login-handling branch from e193b9d to 9275962 Compare April 14, 2026 22:46
@jcofield jcofield changed the title get login from env every time 4) get login from env every time Apr 20, 2026
Comment thread watttime/api.py
@sam-watttime sam-watttime force-pushed the improve-login-handling branch from 9275962 to a64d79e Compare April 20, 2026 19:52
@sam-watttime sam-watttime merged commit 7c5c56d into main Apr 20, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

4 participants