aboutsummaryrefslogtreecommitdiffstats
path: root/teleterm/src/config.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-27 11:29:09 -0500
committerJesse Luehrs <doy@tozt.net>2019-11-27 11:29:09 -0500
commita7ebc62a80933a73eae2282827e74dfaeb107820 (patch)
treeab3c9972f36926e67961eb09e23a700cba7479c2 /teleterm/src/config.rs
parenta7b13be27b7398c84296ef82ba60b7a441a3fb0f (diff)
downloadteleterm-a7ebc62a80933a73eae2282827e74dfaeb107820.tar.gz
teleterm-a7ebc62a80933a73eae2282827e74dfaeb107820.zip
calculate the redirect_url for web oauth too
a bit more complicated because it needs to use the configured public_address, etc
Diffstat (limited to 'teleterm/src/config.rs')
-rw-r--r--teleterm/src/config.rs20
1 files changed, 5 insertions, 15 deletions
diff --git a/teleterm/src/config.rs b/teleterm/src/config.rs
index 4000cb7..95d5366 100644
--- a/teleterm/src/config.rs
+++ b/teleterm/src/config.rs
@@ -913,22 +913,12 @@ where
auth_client,
})
.map_err(serde::de::Error::custom)?;
+ // this is wrong for Web configs, but it gets fixed up
+ // later since we need to calculate the real value from
+ // other parts of the config
let redirect_url =
- if auth_client == crate::protocol::AuthClient::Cli {
- url::Url::parse(crate::oauth::CLI_REDIRECT_URL)
- .unwrap()
- } else {
- config
- .redirect_url
- .context(
- crate::error::OauthMissingConfiguration {
- field: "redirect_url",
- auth_type,
- auth_client,
- },
- )
- .map_err(serde::de::Error::custom)?
- };
+ url::Url::parse(crate::oauth::CLI_REDIRECT_URL)
+ .unwrap();
crate::oauth::RecurseCenter::config(
&client_id,
&client_secret,