Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Feature: Option to store auth and automatically reauthenticate #44

Open
1 of 3 tasks
CosmicHorrorDev opened this issue May 11, 2020 · 3 comments
Open
1 of 3 tasks
Labels
enhancement New feature or request help wanted Extra attention is needed low priority

Comments

@CosmicHorrorDev
Copy link
Owner

Feature Request

  • Expose functionality from the API
  • Add extra functionality in the library
  • Other:

Description

So this will likely apply to people who are creating interactive interfaces instead of scripts/extensions/plugins that will be run in a quick session, but it would be nice for an option to automatically re-authenticate with the API after a timeout (15 minutes). This could be a param on AuthSubwinder where if credentials are passed in as parameters then they are stored in some way or another, and nothing special has to be done for env vars. I think the easiest solution is to keep track of when the last request was and reauth if it's over the 15-minute limit. The more robust way would be to try the request, then automatically reauth if the API throws an auth error, then retry the request again. If there are consistently auth errors then the request should fail and bubble up the error instead of retrying forever.

@CosmicHorrorDev CosmicHorrorDev added the enhancement New feature or request label May 11, 2020
@CosmicHorrorDev CosmicHorrorDev modified the milestone: Version 1.1.0 May 11, 2020
@CosmicHorrorDev
Copy link
Owner Author

I would love to hear some extra input about this though since it is technically dealing with some potentially sensitive information. Granted these have to be passed into the library at some point in time and it should be a privileged action to see other program's memory, but I'd love to hear if anything should be done from a security stance.

@CosmicHorrorDev CosmicHorrorDev added the help wanted Extra attention is needed label May 11, 2020
@CosmicHorrorDev
Copy link
Owner Author

Currently testing to see how strictly the delay is enforced. Will post back later with results.

@CosmicHorrorDev
Copy link
Owner Author

So after a few days of testing limits. It looks like the session timing out happens much slower than the documented 15 minutes. Because the session seems much longer I'm not gonna stress too much about this, but I'll leave the issue open regardless in case people start running into problems.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed low priority
Projects
None yet
Development

No branches or pull requests

1 participant