Skip to content

Commit

Permalink
handle another callback url parsing error
Browse files Browse the repository at this point in the history
  • Loading branch information
t-aleksander committed Nov 22, 2024
1 parent bb55b05 commit 22d85a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/enterprise/handlers/openid_login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ use crate::{
};

async fn get_provider_metadata(url: &str) -> Result<CoreProviderMetadata, WebError> {
let issuer_url = IssuerUrl::new(url.to_string()).unwrap();
let issuer_url = IssuerUrl::new(url.to_string()).map_err(|err| {
WebError::BadRequest(format!(
"Failed to create issuer URL from the provided URL: {url}. Error details: {err:?}",
))
})?;
// Discover the provider metadata based on a known base issuer URL
// The url should be in the form of e.g. https://accounts.google.com
// The url shouldn't contain a .well-known part, it will be added automatically
Expand Down

0 comments on commit 22d85a3

Please # to comment.