charts: headscale oidc
diff --git a/charts/headscale/templates/oauth2-client.yaml b/charts/headscale/templates/oauth2-client.yaml
new file mode 100644
index 0000000..c05b69a
--- /dev/null
+++ b/charts/headscale/templates/oauth2-client.yaml
@@ -0,0 +1,20 @@
+{{- $secret := include "clientSecret" . -}}
+apiVersion: hydra.ory.sh/v1alpha1
+kind: OAuth2Client
+metadata:
+ name: headscale
+ namespace: {{ .Release.Namespace }}
+spec:
+ grantTypes:
+ - authorization_code
+ responseTypes:
+ - code
+ scope: "openid profile email"
+ secretName: {{ .Values.oauth2.secretName }}
+ redirectUris:
+ - https://headscale.{{ .Values.domain }}/oidc/callback
+ hydraAdmin:
+ url: {{ .Values.oauth2.hydraAdmin }}
+ port: 80
+ endpoint: /clients
+ forwardedProto: https