diff --git a/testserver/docker_dokuwiki/tasks/main.yml b/testserver/docker_dokuwiki/tasks/main.yml
index 86f845311c1a9c612d46570d87451c089bcf42e9..a48f0ed5bee1d14b0813944ad9ae7ce7c95f8f5a 100644
--- a/testserver/docker_dokuwiki/tasks/main.yml
+++ b/testserver/docker_dokuwiki/tasks/main.yml
@@ -12,6 +12,10 @@
     - "{{ basedir }}"
     - "{{ basedir }}/data"
     - "{{ basedir }}/pdftemplate"
+    - "{{ basedir }}/data/lib"
+    - "{{ basedir }}/data/lib/plugins"
+    - "{{ basedir }}/data/lib/plugins/oauth"
+    - "{{ basedir }}/data/lib/plugins/oauthgeneric"
 
 - name: Docker Compose Konfig-Datei erstellen
   template:
@@ -20,9 +24,36 @@
   with_items:
     - docker-compose.yml
     - Dockerfile
-    - authuffd_vars.php
   register: config
 
+- name: oauth plugin clonen
+  ansible.builtin.git:
+    repo: https://github.com/cosmocode/dokuwiki-plugin-oauth.git
+    dest: "{{ basedir }}/data/lib/plugins/oauth"
+    force: true
+
+- name: config für oauth kopieren
+  ansible.builtin.template:
+    src: oauth_vars.php
+    dest: "{{ basedir }}/data/lib/plugins/oauth/conf/default.php"
+
+- name: oauthgeneric plugin clonen
+  ansible.builtin.git:
+    repo: https://github.com/cosmocode/dokuwiki-plugin-oauthgeneric.git
+    dest: "{{ basedir }}/data/lib/plugins/oauthgeneric"
+    force: true
+
+- name: config für oauthgeneric kopieren
+  ansible.builtin.template:
+    src: oauthgeneric_vars.php
+    dest: "{{ basedir }}/data/lib/plugins/oauthgeneric/conf/default.php"
+
+- name: oauth provider aktivieren
+  ansible.builtin.lineinfile:
+    path: "{{ basedir }}/data/conf/local.php"
+    regexp: "^$conf['authtype'] = "
+    line: "$conf['authtype'] = 'oauth';"
+
 - name: "stop {{ servicename}} docker"
   community.docker.docker_compose_v2:
     project_src: "{{ basedir }}"
diff --git a/testserver/docker_dokuwiki/templates/Dockerfile b/testserver/docker_dokuwiki/templates/Dockerfile
index c8d7a90f95427f2b7df4928e25e14faccee5f348..7a1e5107fdfa4f6d20ae9ab7486bb98a2bd39f1e 100644
--- a/testserver/docker_dokuwiki/templates/Dockerfile
+++ b/testserver/docker_dokuwiki/templates/Dockerfile
@@ -25,16 +25,6 @@ RUN apt-get update && apt-get install -y wget unzip git \
     && tar -xvzf dokuwiki-stable.tgz -C /var/www/html --strip-components=1 \
     && rm dokuwiki-stable.tgz
 
-# Plugin-Verzeichnis erstellen und das Authentifizierungs-Plugin hinzufügen
-RUN mkdir -p /var/www/html/lib/plugins/authuffd \
-    && git clone https://git.cccv.de/uffd/dokuwiki-plugin-authuffd.git /var/www/html/lib/plugins/authuffd
-
-# Konfigurationsdatei für das Plugin anpassen
-COPY authuffd_vars.php /var/www/html/lib/plugins/authuffd/conf/default.php
-
-# DokuWiki Konfiguration anpassen
-RUN echo "\$conf['authtype'] = 'authuffd';" >> /var/www/html/conf/local.php
-
 # Setzen der richtigen Berechtigungen
 RUN chown -R www-data:www-data /var/www/html
 
diff --git a/testserver/docker_dokuwiki/templates/authuffd_vars.php b/testserver/docker_dokuwiki/templates/authuffd_vars.php
deleted file mode 100644
index df9a1fc7ace20d3c0f7018db999979f47a7d28a5..0000000000000000000000000000000000000000
--- a/testserver/docker_dokuwiki/templates/authuffd_vars.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-$conf['name'] = 'uffd';
-$conf['baseurl'] = '{{ oidc_global.provider_url }}';
-$conf['oauth2_client_id'] = '{{ servicename }}';
-$conf['oauth2_client_secret'] = '{{ oauth_secret }}';
-$conf['oauth2_redirect_uri'] = '{{ domain }}/dokuwiki/doku.php?id=authredirect';
-#$conf['api_username'] = '';
-#$conf['api_password'] = '';
diff --git a/testserver/docker_dokuwiki/templates/oauth_vars.php b/testserver/docker_dokuwiki/templates/oauth_vars.php
new file mode 100644
index 0000000000000000000000000000000000000000..a1da0e0e8c624f9ca352df40a241c72eb8c36430
--- /dev/null
+++ b/testserver/docker_dokuwiki/templates/oauth_vars.php
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * Default settings for the oauth plugin
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+
+$conf['info'] = '';
+$conf['custom-redirectURI']  = '';
+$conf['mailRestriction']     = '';
+$conf['singleService']       = '';
+$conf['register-on-auth']    = 1;
+$conf['overwrite-groups']    = 0;
\ No newline at end of file
diff --git a/testserver/docker_dokuwiki/templates/oauthgeneric_vars.php b/testserver/docker_dokuwiki/templates/oauthgeneric_vars.php
new file mode 100644
index 0000000000000000000000000000000000000000..2dce5ec6287cbed65b37bf550643a28e2a44ffaf
--- /dev/null
+++ b/testserver/docker_dokuwiki/templates/oauthgeneric_vars.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Default settings for the oauthgeneric plugin
+ */
+
+$conf['key'] = 'dokuwiki';
+$conf['secret'] = '{{ oauth_secret }}';
+
+$conf['authurl'] = '{{ oauth_global.authorize_url }}';
+$conf['tokenurl'] = '{{ oauth_global.token_url }}';
+$conf['userurl'] = '{{ oauth_global.userinfo_url }}';
+$conf['authmethod'] = '1';
+$conf['scopes'] = 'email, openid, profile, groups';
+$conf['needs-state'] = 0;
+
+$conf['json-user'] = 'prefered_username';
+$conf['json-name'] = 'name';
+$conf['json-mail'] = 'email';
+$conf['json-grps'] = 'groups';
+
+$conf['label'] = 'uffd';
+$conf['color'] = '#ff3d00';
\ No newline at end of file