Getekid / cas

A phpBB 3.3.x plugin to enable login with CAS Authentication
2 stars 3 forks source link

Still doesn't work on fresh install #3

Closed Jhereck closed 8 years ago

Jhereck commented 9 years ago

Ok reinstalled phpbb 3.1.2 and got the same error as before : setuped my CAS server, logged in CAS, tried to click on "Login" on phpbb, and it ask for login and pass like for a db authentication.

When using login/pass, i got a blank screen. So can't log in on the board, again !

It may be a problem with the phpcas library installation or something like that if it works on your board !

Jhereck commented 9 years ago

I thought to something : does the plugin automaticly create new account when an user is not registered on phpbb and he tries to log in through CAS ?

Maybe that's the problem in my case !

nicocasel commented 9 years ago

Thanks @Jhereck for this issue because I get almost the same: 1) I access to the forum unlogged 2) I login with my CAS login/pwd 3) I am redirected to the CAS validation page ("Your CAS account is ok") during only one second... 4) then I am redirected to the forum login page, asking for a db authentication.

@Getekid : what do you think about it?

Getekid commented 9 years ago

First to clarify that just pressing the Login button is enough. CAS can't read your username/password and this is why it redirects you to his server to login. On a next version the form will be delimited to just the button. For now you can just ignore the user/pass text areas.

Redirecting back to the db screen is a bug I plan to fix asap. A temporary workaround is to add if (defined('IN_LOGIN') && request_var('mode', '') == 'login') { phpCAS::forceAuthentication(); } on auth/provider/cas.php line 71 (before the curly bracket). Still this is kinda messy and doesn't make the plugin as stable as it should be.

@Jhereck, about the blank screen, another thing you could try is commenting line 47 of auth/provider/cas.php . This is just for unblocking your board, as without that command you won't be able to CAS login at all.

Jhereck commented 9 years ago

Ok after an other reinstall i will be more precise : currently i'm not redirected to my CAS server login page when i click on the login button ! Is it needed to put the "http://" in the adress of the CAS server ?!

Jhereck commented 9 years ago

Tried with "http//", same result : not redirected to my CAS server..... Got the standard DB login form instead.

CAS identification is working with Drupal module, with this configuration :

Host : clg-henriwallon77.ac-creteil.fr Port : 8443 Url : Blank Certificate : Blank

What's going wrong ?

Getekid commented 9 years ago

Nothing to worry about, if you are already logged in, the CAS server doesn't ask you to login again, so it redirects you back to the form (because of the bug)! CAS login with be again required if you CAS logout.

Try the workaround I mention above and check again or wait for the next version!

nicocasel commented 9 years ago

Hi @Getekid , I've tried your temp workaround and here is what happens: I go directly to the CAS (this is normal) but then the CAS redirects me to the Board as... logout, so I have to login once again.

Getekid commented 9 years ago

Try logging in in your CAS server, then going to the login screen of your board (not the index, but the /ucp.php?mode=login) and then clicking "Login"!

Oh and something that was mentioned before but wasn't clarified (sorry for that, it's important). Authentication can happen ONLY if the user already exists in the db!

Jhereck commented 9 years ago

Ok so the fact that users needed to be registered in DB may be the main problem in my case.

Is it possible to make the registration of new users automatic when they log in through CAS pls ?

nicocasel commented 9 years ago

"Try logging in in your CAS server, then going to the login screen of your board (not the index, but the /ucp.php?mode=login) and then clicking "Login"!" @Getekid : thanks for this precision but it does not solve totally the problem. Indeed, after clicking "Login" I am registered on the forum, ok... But the ideal scenario (and most user-friendly) would be: after logging in the CAS server, I am redirected to the login screen (or whatever forum screen) and I already appear as registered (with my login id displayed in the upper right-hand corner); we can not oblige user to click another time on "login"...

@Jhereck: as @Getekid said before, new users automatically registered will be next step of his work :-)

Getekid commented 9 years ago

Hello, indeed this is the most user-friendly way, this is the reason I mentioned this way as a temporary workaround and messy ! It's just that I haven't yet found a way to successfully implement it yet. I will keep you updated on the issue.

PS: For aditional user-friendliness, I also plan to hide the user/pass textareas and just keep the button.

Jhereck commented 9 years ago

Can't wait for the automatic DB user registration when connecting with CAS !! :)

Jhereck commented 9 years ago

Hi !

So any news from an update to automaticly register users connecting with CAS to the forum database ?

Thanks ! :)

Getekid commented 9 years ago

Hi, development has been slow lately but this feature won't take much.

Still, this issue is for the plugin's functionality. Please open a new feature request in order to discuss more about it.

Thanks

Getekid commented 8 years ago

Closing this as