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

sign-up / register endpoint: create a new Drive and a new Agent in one request #489

Open
2 of 8 tasks
joepio opened this issue Sep 1, 2022 · 4 comments · May be fixed by #505
Open
2 of 8 tasks

sign-up / register endpoint: create a new Drive and a new Agent in one request #489

joepio opened this issue Sep 1, 2022 · 4 comments · May be fixed by #505

Comments

@joepio
Copy link
Member

joepio commented Sep 1, 2022

Creating a new user / Agent is currently always done using Invites. That flow doesn't make a lot of sense for most usecases: users will probably want their own workspace / Drive, and not join some existing one.

So how should that work?

  • I think we need a /signUp endpoint that takes a public key + username and creates a drive + agent.
  • A custom view is warranted, since the client still needs to generate the key (and that should happen at the touch of some button)
  • We should check for name collissions. Every username must be unique, as we'll use that for the URL.

Front end:

  • Use /register and /confirm-email endpoints
  • User can Register using one button
  • Create new drives the new way
  • Remove / change old invite system. Maybe it still should work, but it needs a refactor at least. We at least want users to create a Drive from an agent without an e-mail address.

PR Checklist:

@AlexMikhalev
Copy link
Collaborator

There should be one user owner of the atomic data go gets keys from logs and then invite others. Sign up can be callback from existing services like Oauth2.

This was referenced Sep 26, 2022
@joepio joepio changed the title sign-up endpoint: create a new Drive and a new Agent in one request sign-up / register endpoint: create a new Drive and a new Agent in one request Oct 12, 2022
@joepio
Copy link
Member Author

joepio commented Oct 13, 2022

I'm currently trying subdomains for every agent. I aethetically really like subdomains, they feel far more personal than paths.

However, they do pose a challenge. Notably, all origin related state (cookies, localstorage) is lost when going to a different subdomain.

Some strategies to deal with this:

  • Instruct the user to safely store their secret, then use it in their new subdomain. I think this is pretty decent. We make sure the users stores their secret. However, this won't transfer some other localstorage things (e.g. dark mode)
  • Stay on the atomicdata.dev domain. We can send cross-domain requests, so it would work, but the user won't get their 'hey this is really my space' feeling.
  • Subdomain-less cookies. We could store everything there, probably. But these are sent over HTTP on every request, as far as I know.
  • iframe hacks. Send private key from old to new.

@AlexMikhalev
Copy link
Collaborator

Subdomains like joep.atomicdata.com?

@joepio
Copy link
Member Author

joepio commented Oct 15, 2022

Subdomains like joep.atomicdata.com?

Exactly

joepio added a commit that referenced this issue Nov 9, 2022
joepio added a commit that referenced this issue Dec 16, 2022
joepio added a commit that referenced this issue Dec 31, 2022
joepio added a commit that referenced this issue Jan 23, 2023
joepio added a commit that referenced this issue Jan 23, 2023
joepio added a commit that referenced this issue Jan 24, 2023
joepio added a commit that referenced this issue Jan 24, 2023
joepio added a commit that referenced this issue Feb 5, 2023
joepio added a commit that referenced this issue Feb 5, 2023
joepio added a commit that referenced this issue Feb 25, 2023
joepio added a commit that referenced this issue Feb 25, 2023
joepio added a commit that referenced this issue Feb 28, 2023
joepio added a commit that referenced this issue Feb 28, 2023
joepio added a commit that referenced this issue Mar 11, 2023
joepio added a commit that referenced this issue Mar 11, 2023
joepio added a commit that referenced this issue Mar 30, 2023
joepio added a commit that referenced this issue Mar 30, 2023
joepio added a commit that referenced this issue Jul 31, 2023
joepio added a commit that referenced this issue Jul 31, 2023
joepio added a commit that referenced this issue Jul 23, 2024
joepio added a commit that referenced this issue Jul 23, 2024
joepio added a commit that referenced this issue Jul 23, 2024
joepio added a commit that referenced this issue Jul 23, 2024
joepio added a commit that referenced this issue Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants