Skip to content

Commit d36c593

Browse files
committed
fix: update the message VC
1 parent 70ddeff commit d36c593

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

messages/web.login.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ Unable to open the browser you specified (%s).
8282

8383
# verificationCode
8484

85-
- Your verification code is %s. Enter this in the browser window that just opened. SECURITY NOTE: Enter this PIN only if you initiated this login.
85+
- Verification Code: %s — If prompted, enter this code in your browser window.

src/commands/org/login/web.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ import { AuthFields, AuthInfo, Logger, Messages, OAuth2Config, SfError, WebOAuth
2121
import { Env } from '@salesforce/kit';
2222
import common from '../../../common.js';
2323

24+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
25+
const messages = Messages.loadMessages('@salesforce/plugin-auth', 'web.login');
26+
const commonMessages = Messages.loadMessages('@salesforce/plugin-auth', 'messages');
27+
2428
export const CODE_BUILDER_STATE_ENV_VAR = 'CODE_BUILDER_STATE';
2529

2630
export const getVerificationCode = (codeBuilderState: string): string => {
2731
const hash = createHash('sha256').update(codeBuilderState, 'utf8').digest('hex');
2832
return hash.substring(0, 4);
2933
};
3034

31-
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
32-
const messages = Messages.loadMessages('@salesforce/plugin-auth', 'web.login');
33-
const commonMessages = Messages.loadMessages('@salesforce/plugin-auth', 'messages');
34-
3535
export type ExecuteLoginFlowParams = {
3636
oauthConfig: OAuth2Config;
3737
browser?: string;

test/commands/org/login/login.web.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ describe('org:login:web', () => {
350350
expect(logStub.callCount).to.equal(0);
351351
const calls = logSuccessStub.getCalls();
352352
const verificationCodeCall = calls.find(
353-
(call) => call.args[0]?.includes('verification code') || call.args[0]?.includes('Enter this')
353+
(call) => call.args[0]?.includes('Verification Code') || call.args[0]?.includes('If prompted')
354354
);
355355
expect(verificationCodeCall).to.not.exist;
356356
expect(logSuccessStub.callCount).to.equal(1);

0 commit comments

Comments
 (0)