[dokuwiki] Re: External authentication with login button

  • From: Marc Franquesa <marc.franquesa@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 31 May 2023 16:07:22 +0200

Hi

I reviewed the code part pointed by Gerard, but that is the abstract
classes and seems the only logic regarding what is visible is more focused
on the client-device being a desktop/phone/...,, no clues there. Thanks
anyway

Also checked the oauth plugin, but I saw that indeed plugs code into the
login form (I suppose to add additional HTML stuff on the form to log
through OAuth), quite cumbersome for my needs.

I tested both with other and the default templates, cleaning cookies and so
the result is the same (so I'm still suspecting of hitting some internal
Dokuwiki logic not related to the template rendering).

I also tried enabling/disabling the 'securecookie' setting to discard that
as a source of issues (as the REMOTE_USER is only set thru HTTPS), but
again the same result.

I forgot to mention (I think important, sorry) that when I visit the wiki
(anonymously) thru HTTP (so no login), dokuwiki shows the Logout button
instead of the Login button, although doing a ?do=check call shows me
(correctly) that I'm not currently not logged in.

Any clues pointing me in the right direction?

Regards

Missatge de Marc Franquesa <marc.franquesa@xxxxxxxxx> del dia ds., 27 de
maig 2023 a les 11:12:

Thanks very much for your interest and quick response.

I just pushed the new part on a separate branch:
https://github.com/markfqs/dokuwiki-plugin-authenvvars/tree/logURL ;(This
is my first plugin code, and I like to start doing the minimal changes
possible until work).

Will take a look to oauth-plugin as well as the references pointed out by
Gerard, although my code is a plugin (not a template) I also checked the
existing code on the template to try to figure out (without luck) that
decision. I only found a snippet of code that shows the Logoff button if
the user is logged in, but no reference to login (as also there isn't such
'cando[login]'.

 Best regards


Missatge de Andreas Gohr <andi@xxxxxxxxxxxxxx> del dia dv., 26 de maig
2023 a les 21:11:

Hi Marc,

 so my suspect is that dokuwiki decide to disable the login button as
my plugin implements trustExternal() (and cando[external] is true).

I don't think so. If I remember correctly the oauth plugin does so
too, but still has a login button.

 I don't get what I miss in my code to make Dokuwiki show the login
button to the user.

Well, it would be easier to help if we could actually see your current
implementation.

Andi
--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist


Other related posts: