-
Notifications
You must be signed in to change notification settings - Fork 83
Description
Issue Description
When used with Authchained or a subclassed OAuth plugin, the "Login with (oauth provider)" button doesn't appear on the Login form.
My use case is that I have two routes for authentication (one is used for API requests). I initially used the Chained Auth plugin to run both - but later I changed to making my auth plugin inherit from the OAuth plugin and had the same issue.
The root cause is that the Action plugin (which adds the login button) tries to be clever and figure out if the OAuth plugin is the active auth plugin, but doesn't account for chained or subclassed auth plugins:
dokuwiki-plugin-oauth/action/login.php
Lines 42 to 43 in cc80e41
| global $conf; | |
| if ($conf['authtype'] != 'oauth') return; |
I'm happy to do the dev work on this but I can see a couple of ways to deal with this and wanted to know what would be preferred if I opened a PR:
- Specifically detect whether Authchained is in use, and if so, check whether "oauth" is included in Authchained's auth plugins list.
- Add a config option to OAuth to force the Login button to always appear, overriding this check.