Add the spacetime login command, which gets a login token from the web server.
I have removedIdentityConfig in this PR, because we don't want to be storing identities anymore. I've also removed almost all of the --identity CLI parameters, because we want users to be going through spacetime login to switch identities, rather than "just in time" via CLI params.
This breaks existing stored identities in the config file.
Expected complexity level and risk
3
Testing
Get a token using spacetime login --host [web-host] (a local one works fine)
Run a local server and get a token using spacetime login --direct local
With either token, publish a module, call a function, and print logs.
Future work
Consider how spacetimedb_token should look to be backwards-compatible with the future changes (e.g. we may want to allow users to login to switch between multiple accounts - what will we cache and where?)
Move spacetimedb_token out of config so we're no longer storing sensitive tokens in a human-edited file
Description of Changes
Add the
spacetime login
command, which gets a login token from the web server.I have removed
IdentityConfig
in this PR, because we don't want to be storing identities anymore. I've also removed almost all of the--identity
CLI parameters, because we want users to be going throughspacetime login
to switch identities, rather than "just in time" via CLI params.Closes https://github.com/clockworklabs/SpacetimeDB/issues/1847.
API and ABI breaking changes
This breaks existing stored identities in the config file.
Expected complexity level and risk
3
Testing
spacetime login --host [web-host]
(a local one works fine)spacetime login --direct local
Future work
spacetimedb_token
should look to be backwards-compatible with the future changes (e.g. we may want to allow users tologin
to switch between multiple accounts - what will we cache and where?)spacetimedb_token
out of config so we're no longer storing sensitive tokens in a human-edited file