diff --git a/lib/utils/services-utils.js b/lib/utils/services-utils.js index 6e36e46fb7..81df146f43 100644 --- a/lib/utils/services-utils.js +++ b/lib/utils/services-utils.js @@ -2,8 +2,10 @@ import base64 from 'base-64'; +import { isDev } from './dev-utils.js'; import { getMessageForException } from './errors.js'; import type { AuthMetadata } from '../shared/identity-client-context.js'; +import { useIsCurrentUserStaff } from '../shared/staff-utils.js'; // If this is true then we're using the identity service for auth. After we // auth, the identity service gives us a CSAT, which we can use to auth with @@ -23,7 +25,11 @@ const relyingOnAuthoritativeKeyserver = true; // can either restore an account (primary login) or log in using the QR code // (secondary login). function useIsRestoreFlowEnabled(): boolean { - return true; + const isCurrentUserStaff = useIsCurrentUserStaff(); + if (isDev) { + return true; + } + return isCurrentUserStaff; } function createHTTPAuthorizationHeader(authMetadata: AuthMetadata): string {