You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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, pscale print-env that dumps out auth creds that can be easily sourced into your env.
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: