diff --git a/packages/core/src/oidc/grants/refresh-token.test.ts b/packages/core/src/oidc/grants/refresh-token.test.ts index 59e7ef6a2..9839b4c80 100644 --- a/packages/core/src/oidc/grants/refresh-token.test.ts +++ b/packages/core/src/oidc/grants/refresh-token.test.ts @@ -298,7 +298,7 @@ describe('organization token grant', () => { Sinon.stub(tenant.queries.organizations.relations.users, 'exists').resolves(true); Sinon.stub(tenant.queries.applications, 'findApplicationById').resolves(mockApplication); Sinon.stub(tenant.queries.applications.userConsentOrganizations, 'exists').resolves(true); - Sinon.stub(tenant.queries.organizations, 'getMfaData').resolves({ + Sinon.stub(tenant.queries.organizations, 'getMfaStatus').resolves({ isMfaRequired: true, hasMfaConfigured: false, }); @@ -322,7 +322,7 @@ describe('organization token grant', () => { { tenantId: 'default', id: 'bar', name: 'bar', description: 'bar' }, { tenantId: 'default', id: 'baz', name: 'baz', description: 'baz' }, ]); - Sinon.stub(tenant.queries.organizations, 'getMfaData').resolves({ + Sinon.stub(tenant.queries.organizations, 'getMfaStatus').resolves({ isMfaRequired: false, hasMfaConfigured: false, }); diff --git a/packages/core/src/oidc/grants/refresh-token.ts b/packages/core/src/oidc/grants/refresh-token.ts index 4f07205fe..d0fbd4b87 100644 --- a/packages/core/src/oidc/grants/refresh-token.ts +++ b/packages/core/src/oidc/grants/refresh-token.ts @@ -248,7 +248,7 @@ export const buildHandler: ( } // Check if the organization requires MFA and the user has MFA enabled - const { isMfaRequired, hasMfaConfigured } = await queries.organizations.getMfaData( + const { isMfaRequired, hasMfaConfigured } = await queries.organizations.getMfaStatus( organizationId, account.accountId ); diff --git a/packages/core/src/queries/organization/index.ts b/packages/core/src/queries/organization/index.ts index 1d4e899b4..a789c228b 100644 --- a/packages/core/src/queries/organization/index.ts +++ b/packages/core/src/queries/organization/index.ts @@ -298,12 +298,12 @@ export default class OrganizationQueries extends SchemaQueries< } /** - * Get the multi-factor authentication (MFA) data for the given organization and user. + * Get the multi-factor authentication (MFA) status for the given organization and user. * * @returns Whether MFA is required for the organization and whether the user has configured MFA. * @see {@link MfaData} */ - async getMfaData(organizationId: string, userId: string) { + async getMfaStatus(organizationId: string, userId: string) { const { table, fields } = convertToIdentifiers(Organizations); const users = convertToIdentifiers(Users);