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

Login: Handle invite user flow #166

Open
5 of 8 tasks
Tracked by #46
livio-a opened this issue Sep 11, 2024 · 2 comments
Open
5 of 8 tasks
Tracked by #46

Login: Handle invite user flow #166

livio-a opened this issue Sep 11, 2024 · 2 comments
Assignees

Comments

@livio-a
Copy link
Member

livio-a commented Sep 11, 2024

zitadel/zitadel#8310 added the possibility to create an invitation link for a user to create their first authentication method.

The V2 login need to be able to handled that and allow user to setup password, passkey and an IdP.

Acceptance criteria

  • An invitation link to the login UI is handled and verifies the provided code using the User V2 VerifyInviteCode endpoint
  • The user has the possibility to resend the code to their email (User V2 ResendInviteCode)
  • After successful verification, the user is presented the available options for authentication (password, passkey, IdP(s))
    • Available options are based on the settings of the organization of the user
  • Please test the following usecases:
    • Given user is created with firstname, lastname, email, email not verified, the user will get an invite code and can add a password, user email is verified and password set
    • Given user is created with firstname, lastname, email, email not verified, the user will get an invite code and can add a passworkey, user email is verified and passkey set
    • Given user is created with firstname, lastname, email, email not verified, the user will get an invite code and can add sso, user email is verified and sso linked
livio-a added a commit to zitadel/zitadel that referenced this issue Sep 11, 2024
# Which Problems Are Solved

As an administrator I want to be able to invite users to my application
with the API V2, some user data I will already prefil, the user should
add the authentication method themself (password, passkey, sso).

# How the Problems Are Solved

- A user can now be created with a email explicitly set to false.
- If a user has no verified email and no authentication method, an
`InviteCode` can be created through the User V2 API.
  - the code can be returned or sent through email
- additionally `URLTemplate` and an `ApplicatioName` can provided for
the email
- The code can be resent and verified through the User V2 API
- The V1 login allows users to verify and resend the code and set a
password (analog user initialization)
- The message text for the user invitation can be customized

# Additional Changes

- `verifyUserPasskeyCode` directly uses `crypto.VerifyCode` (instead of
`verifyEncryptedCode`)
- `verifyEncryptedCode` is removed (unnecessarily queried for the code
generator)

# Additional Context

- closes #8310
- TODO: login V2 will have to implement invite flow:
zitadel/typescript#166
@hifabienne hifabienne moved this to 🔖 Ready in Product Management Sep 16, 2024
@hifabienne hifabienne moved this from 🔖 Ready to 📝 Prioritized Product Backlog in Product Management Sep 16, 2024
@hifabienne
Copy link
Member

@peintnermax can you please estimate this issue?

@hifabienne hifabienne moved this from 📝 Prioritized Product Backlog to 📋 Sprint Backlog in Product Management Sep 26, 2024
@peintnermax peintnermax mentioned this issue Oct 18, 2024
16 tasks
@muhlemmer muhlemmer moved this from 👀 In review to 🏗 In progress in Product Management Nov 28, 2024
@livio-a
Copy link
Member Author

livio-a commented Dec 4, 2024

We should also have a look at how to handle if the code is expired when clicking the link:
zitadel/zitadel#8850

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗 In progress
Development

No branches or pull requests

3 participants