Skip to content

Conversation

seungyeoneeee
Copy link
Contributor

Skip Review (optional)

  • Minor changes that don't affect the functionality (e.g. style, chore, ci, test, docs)
  • Previously reviewed in feature branch, further review is not mandatory
  • Self-merge allowed for solo developers or urgent changes

Description (optional)

Things to Talk About (optional)

Copy link

vercel bot commented Aug 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
console ⬜️ Ignored Preview Aug 14, 2025 1:08am
mfa-saas-qa ⬜️ Ignored Aug 14, 2025 1:08am
web-storybook ⬜️ Ignored Aug 14, 2025 1:08am

Copy link
Contributor

🎉 @yuda110 has been randomly selected as the reviewer! Please review. 🙏

@github-actions github-actions bot requested a review from yuda110 August 14, 2025 00:44
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the multi-factor authentication (MFA) system to use Vue Query and resolves conflicts around MFA code matching. The main changes include replacing traditional API calls with Vue Query patterns, updating MFA modal components, and adding new functionality for MFA enforcement in user management.

  • Replaced manual API calls with Vue Query mutations and queries for MFA operations
  • Refactored MFA modal components to use a more modular approach with separate enable/disable modals
  • Added MFA enforcement functionality in user management with bulk operations support

Reviewed Changes

Copilot reviewed 72 out of 73 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
packages/mirinae/src/controls/select-card/PSelectCard.vue Added readonly prop and styling to support disabled selection cards
packages/language-pack/*.json Added new translation keys for MFA enforcement and user management features
packages/core-lib/src/space-connector/ Removed service configuration features and added token removal methods
apps/web/src/store/user/ Updated user store types to support required actions and MFA enforcement
apps/web/src/services/my-page/ Refactored MFA components to use Vue Query and modular modal approach
apps/web/src/services/iam/ Added bulk MFA setting functionality with new modal components
apps/web/src/services/auth/ Added MFA setup page for enforced authentication flow
apps/web/src/common/components/mfa/ Created reusable MFA components with Vue Query integration
apps/web/src/api-clients/identity/ Updated API schemas to support MFA enforcement parameters

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

passwordFormState.invalidText = '';
passwordFormState.passwordCheckModalVisible = false;
showSuccessMessage(i18n.t('COMMON.PROFILE.SUCCESS_PASSWORD_CHECK'));
showSuccessMessage(i18n.t('COMMON.PROFILE.SUCCESS_PASSWORD_CHECK'), '');
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

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

The showSuccessMessage function is being called with an empty string as the second argument. This pattern is inconsistent and the empty string parameter should either be removed or properly documented if it serves a specific purpose.

Suggested change
showSuccessMessage(i18n.t('COMMON.PROFILE.SUCCESS_PASSWORD_CHECK'), '');
showSuccessMessage(i18n.t('COMMON.PROFILE.SUCCESS_PASSWORD_CHECK'));

Copilot uses AI. Check for mistakes.

passwordFormState.invalidText = '';
passwordFormState.passwordCheckModalVisible = false;
showSuccessMessage(i18n.t('COMMON.PROFILE.SUCCESS_PASSWORD_CHECK'));
showSuccessMessage(i18n.t('COMMON.PROFILE.SUCCESS_PASSWORD_CHECK'), '');
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

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

Same issue as above - inconsistent use of showSuccessMessage with empty string parameter.

Suggested change
showSuccessMessage(i18n.t('COMMON.PROFILE.SUCCESS_PASSWORD_CHECK'), '');
showSuccessMessage(i18n.t('COMMON.PROFILE.SUCCESS_PASSWORD_CHECK'));

Copilot uses AI. Check for mistakes.

/* API */
const { mutateAsync: confirmMfa, isPending: isConfirmingMfa } = useUserProfileConfirmMfaMutation({
onSuccess: (data: UserModel) => {
showSuccessMessage(i18n.t('COMMON.MFA_MODAL.ALT_S_ENABLED'), '');
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

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

Inconsistent use of showSuccessMessage with empty string parameter.

Suggested change
showSuccessMessage(i18n.t('COMMON.MFA_MODAL.ALT_S_ENABLED'), '');
showSuccessMessage(i18n.t('COMMON.MFA_MODAL.ALT_S_ENABLED'));

Copilot uses AI. Check for mistakes.

</template>
<template #col-tags-format="{value}">
<template v-if="value && !!Object.keys(value).length">
<template v-if="value && typeof value === 'object' && !!Object.keys(value).length">
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

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

The type check 'typeof value === 'object'' should also exclude null since typeof null === 'object' in JavaScript. Consider using 'value && typeof value === 'object' && value !== null' or a more specific check.

Suggested change
<template v-if="value && typeof value === 'object' && !!Object.keys(value).length">
<template v-if="value && typeof value === 'object' && value !== null && !!Object.keys(value).length">

Copilot uses AI. Check for mistakes.

</template>
<template #col-tags-format="{value}">
<template v-if="value !== undefined && Object.keys(value).length > 0">
<template v-if="value && typeof value === 'object' && Object.keys(value).length > 0">
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

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

Same issue as above - the type check should exclude null since typeof null === 'object' in JavaScript.

Suggested change
<template v-if="value && typeof value === 'object' && Object.keys(value).length > 0">
<template v-if="value && typeof value === 'object' && value !== null && Object.keys(value).length > 0">

Copilot uses AI. Check for mistakes.

if (!oneNumberValidator(value)) return i18n.t('IDENTITY.USER.FORM.ONE_NUMBER_INVALID');
const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,}$/;
if (!passwordRegex.test(value)) {
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

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

The password validation regex is duplicated in multiple files (UserManagementAddPassword.vue and UserManagementFormPasswordForm.vue). Consider extracting this to a shared constant or utility function to maintain consistency and avoid duplication.

Suggested change
if (!passwordRegex.test(value)) {
if (!PASSWORD_REGEX.test(value)) {

Copilot uses AI. Check for mistakes.

}, {
password(value: string) {
if (value === '') return '';
const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,}$/;
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

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

This password validation regex is duplicated from UserManagementFormPasswordForm.vue. Consider extracting to a shared utility.

Suggested change
const passwordRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,}$/;

Copilot uses AI. Check for mistakes.

@seungyeoneeee seungyeoneeee removed the request for review from yuda110 August 14, 2025 00:48
@seungyeoneeee seungyeoneeee merged commit 5299a2a into cloudforet-io:feature-query-integration Aug 14, 2025
5 of 7 checks passed
sulmoJ added a commit that referenced this pull request Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants