-
Notifications
You must be signed in to change notification settings - Fork 10
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
Expose a way to create a PlanetScale Client using the same auth method as the CLI #175
Comments
I think this sorta is not something possible since Keychain access is heavily restricted by binaries. So given that, I guess I don't see any way for other tools to leverage an existing access-token or logged in session from the pscale CLI. And you always need your own service token or unique oauth app. Wonder if there's a middleground possible for the CLI to provide something like, But I might be stretching now, just found it a bit unintuitive that I wasn't able to leverage my already logged in session. |
From within
planetscale/cli
, everything as far as reading a config file and yanking an access token out of the OS keyring is locked away in internal packages internal to the CLI.If I want to use this library in code, in theory, I'd like to instantiate a client that leverages my system's auth in a similar fashion. Whether this is fully depending on the config file pscale CLI writes, or just sharing some mechanism to yank an already auth'd token out of the keyring would be super nice.
This would allow tooling outside of
pscale
to "just work" without requiring use of the CLI.Maybe just necessary for the keyring access being one of the constructor arguments?
or something similar is what I'm thinking. I'd like to leverage this rather than extract it and set it as an env var or pass as a flag to something else.
Thoughts?
The text was updated successfully, but these errors were encountered: