Skip to content

Commit c37d6da

Browse files
committed
missing DB stuffs
1 parent 710faba commit c37d6da

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

crates/storage-pg/src/iden.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ pub enum UpstreamOAuthProviders {
9898
EncryptedClientSecret,
9999
TokenEndpointSigningAlg,
100100
TokenEndpointAuthMethod,
101+
FetchUserinfo,
101102
CreatedAt,
102103
DisabledAt,
103104
ClaimsImports,

crates/storage-pg/src/upstream_oauth2/provider.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ struct ProviderLookup {
7272

7373
impl TryFrom<ProviderLookup> for UpstreamOAuthProvider {
7474
type Error = DatabaseInconsistencyError;
75+
76+
#[allow(clippy::too_many_lines)]
7577
fn try_from(value: ProviderLookup) -> Result<Self, Self::Error> {
7678
let id = value.upstream_oauth_provider_id.into();
7779
let scope = value.scope.parse().map_err(|e| {
@@ -681,6 +683,13 @@ impl<'c> UpstreamOAuthProviderRepository for PgUpstreamOAuthProviderRepository<'
681683
)),
682684
ProviderLookupIden::CreatedAt,
683685
)
686+
.expr_as(
687+
Expr::col((
688+
UpstreamOAuthProviders::Table,
689+
UpstreamOAuthProviders::FetchUserinfo,
690+
)),
691+
ProviderLookupIden::FetchUserinfo,
692+
)
684693
.expr_as(
685694
Expr::col((
686695
UpstreamOAuthProviders::Table,

0 commit comments

Comments
 (0)