-
Notifications
You must be signed in to change notification settings - Fork 3
Add MFA status indicators to login sessions #250
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
base: main
Are you sure you want to change the base?
Conversation
- Add mfaAuthenticated field to token type definitions - Create MfaStatusIndicator component with color-coded icons - Add MFA Status column to both Current and Other login session tables - Display green check (MFA used), red check (single factor), or grey check (not supported) - Include tooltips for each status type - Only show indicators for Login token types
<FontAwesomeIcon icon={faCheck} style={{ color: 'green' }} /> | ||
</Tooltip> | ||
); | ||
} else if (mfaAuthenticated === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to use else
if the previous statement was a return
<FontAwesomeIcon icon={faCheck} style={{ color: 'red' }} /> | ||
</Tooltip> | ||
); | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
<FontAwesomeIcon icon={faCheck} style={{ color: 'green' }} /> | ||
</Tooltip> | ||
); | ||
} else if (mfa === 'NOT_USED') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for else
after a return
https://eslint.org/docs/latest/rules/no-else-return
why I started following this rule:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel it makes it less readable... else makes it clear it's exclusive to the blocks above, especially for multiple if-else-ifs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ie I agree it is "textually" (in execution) superfluous but I think it is sub-textually substantial
Adds support for the new auth2 mfa feature kbase/auth2#471. Should only be merged and deployed after auth2#471 is merged and deployed in all environments.