auth works, getting email not yet

This commit is contained in:
Jacob Lifshay 2024-04-08 03:00:24 -07:00
parent 663af59488
commit 5eabc89280
Signed by: programmerjake
SSH key fingerprint: SHA256:B1iRVvUJkvd7upMIiMqn6OyxvD2SgJkAH3ZnUOj6z+c
5 changed files with 77 additions and 5 deletions

View file

@ -5,7 +5,7 @@ use futures::future::try_join_all;
use indexmap::IndexMap;
use openidconnect::{
core::{CoreClient, CoreProviderMetadata},
ClientId, ClientSecret, IssuerUrl, Scope,
ClientId, ClientSecret, IssuerUrl, RedirectUrl, Scope,
};
use serde::{Deserialize, Serialize};
@ -55,6 +55,7 @@ pub struct OIDCProvider {
pub issuer_url: IssuerUrl,
pub client_id: ClientId,
pub secret: ClientSecret,
pub redirect_url: RedirectUrl,
pub scopes: Vec<Scope>,
#[serde(skip)]
state: Option<OIDCProviderState>,
@ -76,6 +77,7 @@ impl OIDCProvider {
Some(self.secret.clone()),
);
let client = client.disable_openid_scope();
let client = client.set_redirect_uri(self.redirect_url.clone());
self.state = Some(OIDCProviderState {
client,
provider_metadata,