Load server config on react app

This commit is contained in:
2023-06-06 15:47:30 +02:00
parent ec98e728d8
commit 8f0a3e1f07
10 changed files with 170 additions and 38 deletions

View File

@ -96,7 +96,7 @@ pub async fn start_login(prov_id: &str, ip: IpAddr) -> anyhow::Result<String> {
Ok(prov.conf.gen_authorization_url(
prov.prov.client_id,
&state_key,
&AppConfig::get().oidc_redirect_url,
&AppConfig::get().oidc_redirect_url(),
))
}
@ -133,7 +133,7 @@ pub async fn finish_login(
prov.prov.client_id,
prov.prov.client_secret,
code,
&AppConfig::get().oidc_redirect_url,
&AppConfig::get().oidc_redirect_url(),
)
.await
.map_err(|e| OpenIDServiceError::QueryTokenEndpoint(e.to_string()))?;