phpcurlauthenticationexternalphpbb3

phpbb3 external login with curl


I have created an extension for my website. It should log in user to forum after he has logged in to the website.

User session was created successfully (checked in database), but user still not logged in.

If I try to log in with external login form, it works great (the session is created and user is logged in).

I think the problem is not in my authentication extension.

I think I did something wrong with curl post and cookie.

What curl options should I set to login? Or maybe you can give me some useful links?


Solution

  • Take some of those phpbb3_* cookies and then send them through [setcookie()](php.net/setcookie) to pass along to the user. It might work, depending on your level of cookie security in phpBB (it can't be tied to IP because curl and the user IP will be different

    drew010

    You won't be able to use curl and pass the cookies to the client if you >have Session IP validation turned on. I'd suggest turning that off, or, >instead of using curl, look for a plugin/module that can do 3rd party >logins, or look at the authentication handling code and replicate it. It >wouldn't take much to log a user in without requiring their phpBB password

    drew010