Skip to content
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

CLI - Login flow #1878

Merged
merged 77 commits into from
Oct 29, 2024
Merged

CLI - Login flow #1878

merged 77 commits into from
Oct 29, 2024

Conversation

bfops
Copy link
Collaborator

@bfops bfops commented Oct 18, 2024

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 through spacetime login to switch identities, rather than "just in time" via CLI params.

Closes #1847.

API and ABI breaking changes

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

@bfops bfops changed the base branch from master to bfops/cli-login October 18, 2024 16:52
@bfops bfops changed the title CLI - Remove identity tokens CLI - Remove identity-tied tokens Oct 18, 2024
@bfops bfops changed the title CLI - Remove identity-tied tokens CLI - Remove IdentityConfig.token Oct 18, 2024
@bfops bfops changed the title CLI - Remove IdentityConfig.token CLI - Remove IdentityConfig Oct 18, 2024
@bfops bfops changed the base branch from bfops/cli-login to jsdt/new-token-2 October 18, 2024 23:10
@bfops bfops changed the base branch from jsdt/new-token-2 to bfops/cli-login October 21, 2024 16:47
cloutiertyler
cloutiertyler previously approved these changes Oct 23, 2024
Copy link
Contributor

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Love the red. I left two small comments.

@bfops bfops enabled auto-merge October 23, 2024 22:07
@bfops bfops disabled auto-merge October 23, 2024 22:10
@bfops
Copy link
Collaborator Author

bfops commented Oct 23, 2024

(Going to fix Internal tests before merging)

@bfops bfops dismissed cloutiertyler’s stale review October 29, 2024 18:35

changes and review have happened

Copy link
Contributor

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM. I might want to bikeshed server-issued-login before final 1.0 release, but it is more descriptive now already.

@bfops bfops enabled auto-merge October 29, 2024 20:19
@bfops bfops added this pull request to the merge queue Oct 29, 2024
Merged via the queue into master with commit 6136038 Oct 29, 2024
8 checks passed
@bfops bfops deleted the bfops/cli-replace-token branch October 29, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement spacetime login
3 participants