Skip to content
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

Support targeting specific browsers for force:auth:web:login #1465

Closed
mike-wannamaker-gs opened this issue Apr 4, 2022 · 9 comments
Closed
Labels
feature Issue or pull request for a new feature help wanted Help wanted to implement this issue

Comments

@mike-wannamaker-gs
Copy link

Is your feature request related to a problem? Please describe.
Similarly to this feature request: #1015 but for the force:auth:web:login command.

What are you trying to do
Would be good to be able to support being able to choose the browser application to use when opening an org with force:auth:web:login

Describe the solution you'd like
Option just like: #1015

@mike-wannamaker-gs mike-wannamaker-gs added the feature Issue or pull request for a new feature label Apr 4, 2022
@github-actions
Copy link

github-actions bot commented Apr 4, 2022

Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.

@github-actions
Copy link

This issue has not received a response in 60 days. It will auto-close in 7 days unless a response is posted.

@github-actions github-actions bot added the stale label Sep 21, 2022
@RodEsp RodEsp removed the stale label Sep 21, 2022
@cristiand391 cristiand391 added the help wanted Help wanted to implement this issue label Nov 7, 2022
@cristiand391
Copy link
Member

Marking this as help wanted, if anyone is interested in adding this feature take a look at this PR which added the required flag to the force:org:open command, it should be mostly copying what's there to the auth command:
salesforcecli/plugin-org#211

force:auth:web:login code where this should be added:
https://github.com/salesforcecli/plugin-auth/blob/main/src/commands/auth/web/login.ts#L105

post here if you have any questions

@RodEsp
Copy link
Contributor

RodEsp commented Nov 30, 2022

Whoops, will close when this is released in stable next week.

@RodEsp RodEsp reopened this Nov 30, 2022
@SCWells72
Copy link

@mshanemc what is the actual resolution of this? Are there new command-line options that I should supply when invoking force:auth:web:login in IC2 based on the IDE's browser preference?

@cristiand391
Copy link
Member

@SCWells72 you can target a specific browser in latest sfdx v.7.180.0 using the new --browser flag, see rel notes:
https://github.com/forcedotcom/cli/tree/main/releasenotes/sfdx#71800-dec-8-2022-stable

It the flag is not specified, force:auth:web:login will still open the default browser.

@lekkimworld
Copy link

It would be REALLY cool if there was an option to open in an incognito window as well. Would that be doable at all?

@cristiand391
Copy link
Member

cristiand391 commented Dec 14, 2022

@lekkimworld we use the open npm pkg to open browsers from the CLI.

Some examples show how to open an incognito window in chrome:
https://github.com/sindresorhus/open#usage

but that doesn't work on all platforms. There's an open request to add a cross-platform solution:
sindresorhus/open#266

I would prefer to wait until a cross-platform solution is added to open rather than implement it in our CLI 👍🏼

@mshanemc
Copy link
Contributor

Also, oauth via an incognito window doesn't work--it'll log in, but the tokens don't come back to the CLI. Probably something to do with how incognito is intentionally isolating identity items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue or pull request for a new feature help wanted Help wanted to implement this issue
Projects
None yet
Development

No branches or pull requests

6 participants