Skip to content

Commit 0352746

Browse files
authored
Print out the url that 'rerun auth login' opens (#11433)
1 parent 93f3074 commit 0352746

File tree

1 file changed

+4
-4
lines changed
  • crates/utils/re_auth/src

1 file changed

+4
-4
lines changed

crates/utils/re_auth/src/cli.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ pub enum Error {
1313
#[error("HTTP server error: {0}")]
1414
Http(std::io::Error),
1515

16-
#[error("failed to open browser: {0}")]
17-
WebBrowser(std::io::Error),
18-
1916
#[error("failed to load context: {0}")]
2017
Context(#[from] workos::ContextLoadError),
2118

@@ -167,7 +164,10 @@ pub async fn login(context: &AuthContext, options: LoginOptions<'_>) -> Result<(
167164
if options.open_browser {
168165
p.println("Opening login page in your browser.");
169166
p.println("Once you've logged in, the process will continue here.");
170-
webbrowser::open(&login_url).map_err(Error::WebBrowser)?;
167+
p.println(format!(
168+
"Alternatively, manually open this url: {login_url}"
169+
));
170+
webbrowser::open(&login_url).ok(); // Ok to ignore error here. The user can just open the above url themselves.
171171
} else {
172172
p.println("Open the following page in your browser:");
173173
p.println(&login_url);

0 commit comments

Comments
 (0)