Skip to content

Commit

Permalink
cli: fix text shown when GH auth is auto-selected (microsoft#196527)
Browse files Browse the repository at this point in the history
  • Loading branch information
connor4312 authored and Alex0007 committed Oct 26, 2023
1 parent be05d66 commit 4be04b4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cli/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

use crate::{
constants::{get_default_user_agent, IS_INTERACTIVE_CLI, PRODUCT_NAME_LONG},
constants::{get_default_user_agent, APPLICATION_NAME, IS_INTERACTIVE_CLI, PRODUCT_NAME_LONG},
debug, error, info, log,
state::{LauncherPaths, PersistedState},
trace,
Expand Down Expand Up @@ -84,7 +84,9 @@ impl AuthProvider {

pub fn grant_uri(&self) -> &'static str {
match self {
AuthProvider::Microsoft => "https://login.microsoftonline.com/organizations/oauth2/v2.0/token",
AuthProvider::Microsoft => {
"https://login.microsoftonline.com/organizations/oauth2/v2.0/token"
}
AuthProvider::Github => "https://github.com/login/oauth/access_token",
}
}
Expand Down Expand Up @@ -673,7 +675,8 @@ impl Auth {
if !*IS_INTERACTIVE_CLI {
info!(
self.log,
"Using Github for authentication, pass the `--provider` option to change this."
"Using Github for authentication, run `{} tunnel user login --provider <provider>` option to change this.",
APPLICATION_NAME
);
return Ok(AuthProvider::Github);
}
Expand Down

0 comments on commit 4be04b4

Please sign in to comment.