fix
This commit is contained in:
@@ -5,6 +5,16 @@ metadata:
|
|||||||
app: immich
|
app: immich
|
||||||
|
|
||||||
entries:
|
entries:
|
||||||
|
- model: authentik_providers_oauth2.scopemapping
|
||||||
|
identifiers:
|
||||||
|
name: "Homepage Custom Scope: Groups"
|
||||||
|
attrs:
|
||||||
|
scope_name: "groups"
|
||||||
|
description: "Pass user groups array to Homepage for conditional element rendering"
|
||||||
|
expression: |
|
||||||
|
return {
|
||||||
|
"groups": [group.name for group in request.user.ak_groups.all()]
|
||||||
|
}
|
||||||
# 1. Create the OAuth2/OIDC Provider
|
# 1. Create the OAuth2/OIDC Provider
|
||||||
- model: authentik_providers_oauth2.oauth2provider
|
- model: authentik_providers_oauth2.oauth2provider
|
||||||
identifiers:
|
identifiers:
|
||||||
@@ -21,7 +31,6 @@ entries:
|
|||||||
!Find [authentik_flows.flow, [slug, default-provider-invalidation-flow]]
|
!Find [authentik_flows.flow, [slug, default-provider-invalidation-flow]]
|
||||||
client_type: "confidential"
|
client_type: "confidential"
|
||||||
client_id: "homepage"
|
client_id: "homepage"
|
||||||
|
|
||||||
client_secret: !Env HOMEPAGE_VAR_OAUTH_SECRET
|
client_secret: !Env HOMEPAGE_VAR_OAUTH_SECRET
|
||||||
access_code_validity: "minutes=5"
|
access_code_validity: "minutes=5"
|
||||||
token_validity: "days=30"
|
token_validity: "days=30"
|
||||||
@@ -47,7 +56,7 @@ entries:
|
|||||||
]
|
]
|
||||||
- !Find [
|
- !Find [
|
||||||
authentik_providers_oauth2.scopemapping,
|
authentik_providers_oauth2.scopemapping,
|
||||||
[name, "authentik default OAuth Mapping: OpenID 'group'"],
|
[name, "Homepage Custom Scope: Groups"],
|
||||||
]
|
]
|
||||||
|
|
||||||
# 2. Create the Application and link it to the Provider
|
# 2. Create the Application and link it to the Provider
|
||||||
|
|||||||
@@ -48,10 +48,6 @@ entries:
|
|||||||
authentik_providers_oauth2.scopemapping,
|
authentik_providers_oauth2.scopemapping,
|
||||||
[name, "authentik default OAuth Mapping: OpenID 'profile'"],
|
[name, "authentik default OAuth Mapping: OpenID 'profile'"],
|
||||||
]
|
]
|
||||||
- !Find [
|
|
||||||
authentik_providers_oauth2.scopemapping,
|
|
||||||
[name, "authentik default OAuth Mapping: OpenID 'group'"],
|
|
||||||
]
|
|
||||||
|
|
||||||
- model: authentik_core.application
|
- model: authentik_core.application
|
||||||
identifiers:
|
identifiers:
|
||||||
|
|||||||
Reference in New Issue
Block a user