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

User Flow in PROCEED: smaller improvements #307

Open
8 of 16 tasks
iaktern opened this issue Jun 17, 2024 · 1 comment
Open
8 of 16 tasks

User Flow in PROCEED: smaller improvements #307

iaktern opened this issue Jun 17, 2024 · 1 comment
Assignees

Comments

@iaktern
Copy link
Contributor

iaktern commented Jun 17, 2024

User Settings:

Image

Image

  • make the Mail address changeable for a user account. The Mail should only be changed if the user confirms the new mail address

  • Linking of multiple (OAuth) accounts to one PROCEED user. Questions (Compare with Miro, etc.):

    • should it be possible to link other OAuth account with different mail addresses to one PROCEED user?
      • how are the OAuth user accounts compared to the PROCEED user account: by mail?
      • if someone logged in by OAuth first, is it afterwards possible to login by mail?
    • should it be possible to link other mail accounts to one PROCEED user?
    • how should the connection to one PROCEED user account be realized? (user setting, login flow, etc.)

Login Screen:

  • Different Login-Screen at PROCEED Start and at Clicking "Sign In". The following login modals should appear:

Image

  • Realize Login Modals
  • "Continue as Guest User" with small hint: "Note: If you select "Continue as Guest", the PROCEED Platform is functionally restricted and your created processes will not be accessible on other devices. All your data will be deleted automatically after a few days."
  • "Login" with small hint: "Note: Simply login with your e-mail address and we will send you an access link."
  • Put the Guest hint also as a Banner into the PROCEED UI, if Guest
  • add OAuth Provider: Google, Auth0, Twitter, Atlassian, Discord
  • add Link to Website with Terms of Service

Added 20.11.2024:

  • No delete of a Space in "My Spaces" (this should only be possible by an Admin from with the Organization Settings)
  • My Spaces View: 1. change Heading to "My Spaces, 2. delete the selection column in the table (because there are no common functions), 3. add a button "Enter" at the end of each row, 4. delete the right meta panel (because it is not needed), 5. use the full width
    Image
@iaktern iaktern converted this from a draft issue Jun 17, 2024
@iaktern iaktern moved this from Todos: Fine-Grained to In Progress in PROCEED MS New Jun 28, 2024
@FelipeTrost
Copy link
Contributor

FelipeTrost commented Jul 8, 2024

@iaktern about the questions of multiple accounts:

There is a difference between user and account. A user represents an actual person, whereas account represents an oauth sign in that a user can use. That being said, next-auth stores the email in user and not in an account, and creates a "fake" account when calling next-auth's callbacks.

When next-auth receives a sign-in, it proceeds differently according to whether a user was already signed in or not.
If a user was signed in (valid next-auth cookies were set in the request), and the account he used to sign in isn't registered for another user, the account gets linked to the user, this is the only way this can happen (you can set flags to link accounts to users based on the email, but this is not recommended). Note that if the account already belonged to that user, then the user is just authenticated.

If there was no user signed in, then next-auth searches a user based on the email specified in the account that the request is using to sign in. If there is a user with that mail, next-auth doesn't link the account to the user as stated before and throws an error. If it finds no user, then a new user and an account associated to it, are created.

Additionally, we add our own logic in the signIn hook that next-auth provides, where if a user, that is already signed in and is a guest, is signing in with a valid account, we update the user's record, to show that he is no longer a guest.

How next-auth handles this is a bit confusing, and I haven't seen it well documented in the docs, if you want, I could make a diagram with this flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

2 participants