-
Notifications
You must be signed in to change notification settings - Fork 405
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
Authorize orgs against different URLs (production, sandbox, or custom) #818
Conversation
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.
This is based on the new message in i18n.ts. I didn't review the code.
Codecov Report
@@ Coverage Diff @@
## develop #818 +/- ##
==========================================
+ Coverage 73.17% 73.28% +0.1%
==========================================
Files 174 174
Lines 6997 7037 +40
Branches 1094 1102 +8
==========================================
+ Hits 5120 5157 +37
- Misses 1599 1602 +3
Partials 278 278
Continue to review full report at Codecov.
|
packages/salesforcedx-vscode-core/src/commands/forceAuthWebLogin.ts
Outdated
Show resolved
Hide resolved
packages/salesforcedx-vscode-core/src/commands/forceAuthWebLogin.ts
Outdated
Show resolved
Hide resolved
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.
This is just based on the messages. I didn't review anything else.
}; | ||
|
||
public static readonly validateUrl = (url: string) => { | ||
const expr = /https?:\/\/(.*)/; |
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 see what you did there, this will work for internal envs too 🕺
packages/salesforcedx-vscode-core/src/commands/forceAuthWebLogin.ts
Outdated
Show resolved
Hide resolved
packages/salesforcedx-vscode-core/src/commands/forceAuthWebLogin.ts
Outdated
Show resolved
Hide resolved
…m/salesforcedx-vscode into bpowell/authWithDifferentUrls
…m/salesforcedx-vscode into bpowell/authWithDifferentUrls
public async getValue(workspacePath: string, key: string) { | ||
const sfdxProject = await SfdxProject.resolve(workspacePath); | ||
const sfdxProjectJson = await sfdxProject.resolveProjectConfig(); | ||
return sfdxProjectJson[key]; |
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.
This is awesome. I tried to break it by deleting sfdcLoginUrl
on my sfdx-project.json
file and it turns out that the cli has a default for this type of scenarios.
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.
Yeah I was hoping that would be the case and it looks like it is! I'm taking advantage of it when determining to render the "Project Default" option with the org type selection.
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.
Merge it once the issue with packaging the extensions gets fixed.
…into bpowell/authWithDifferentUrls
What does this PR do?
When users authorize an org, they now choose to log-in against production, sandbox, or enter a custom URL.
What issues does this PR fix or reference?
W-5459248, #610