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

[Active users][Settings][Kebab] Add 'OTP token' option #219

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

carma12
Copy link
Collaborator

@carma12 carma12 commented Dec 14, 2023

The 'Add OTP token' option creates a new OTP token associated with a specific user.

After adding a new OTP Token, a QR code to configure the token must be generated. Thus, a React-compatible library to generate those QR codes needs to be used in the project.

The qrcode.react[1] library has been chosen because of its effective way of creating and customizing QR codes. To install the package just run: npm install.

[1] - https://github.com/zpao/qrcode.react

@carma12 carma12 force-pushed the kebab-add-otp-token-option branch 3 times, most recently from c17c473 to 17533ea Compare December 19, 2023 08:18
src/components/Form/DateTimeSelector.tsx Show resolved Hide resolved
src/components/UserSettings.tsx Outdated Show resolved Hide resolved
src/components/layouts/HelperTextWithIcon.tsx Outdated Show resolved Hide resolved
src/components/layouts/HelperTextWithIcon.tsx Outdated Show resolved Hide resolved
src/components/modals/QrCodeModal.tsx Outdated Show resolved Hide resolved
src/components/modals/AddOtpToken.tsx Show resolved Hide resolved
src/components/modals/AddOtpToken.tsx Outdated Show resolved Hide resolved
@pvoborni pvoborni self-assigned this Jan 5, 2024
@pvoborni
Copy link
Member

pvoborni commented Jan 5, 2024

Most of the suggestions from the review are in pvoborni@78663f8 - you can apply the commit. It was written partly to verify what I wrote is correct, second reason is that code is better illustration.

@carma12
Copy link
Collaborator Author

carma12 commented Jan 9, 2024

@pvoborni - I have already adapted the code based on your comments.

@carma12 carma12 force-pushed the kebab-add-otp-token-option branch 5 times, most recently from 5914a0d to a7a9f41 Compare January 11, 2024 15:23
After adding a new OTP Token,
a QR code to configure the
token must be generated.
Thus, a React-compatible
library to generate those
QR codes need to be used in
the project.

The qrcode.react[1] library has
been chosen by its effective way
of create and customize QR codes.

[1] - https://github.com/zpao/qrcode.react
Signed-off-by: Carla Martinez <[email protected]>
Copy link
Member

@pvoborni pvoborni left a comment

Choose a reason for hiding this comment

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

Did additional manual functional testing and found 2 issues, see the comments.

src/components/modals/AddOtpToken.tsx Outdated Show resolved Hide resolved
src/components/modals/AddOtpToken.tsx Show resolved Hide resolved
The 'Add OTP token' option
creates a new OTP token
associated to a specific user.

The QR code has been generated
using the qrcode.react[1]
library.

[1]- https://github.com/zpao/qrcode.react
Signed-off-by: Carla Martinez <[email protected]>
Copy link
Member

@pvoborni pvoborni left a comment

Choose a reason for hiding this comment

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

LGTM

@carma12 carma12 merged commit b2dcd0f into freeipa:main Jan 17, 2024
3 checks passed
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 this pull request may close these issues.

2 participants