Skip to:

New Login Required When Between bbPress and WordPress

  • This is a continuation of the post

    Next item after an “integrated” bbPress / WordPress upgrade is a login issue. Prior to upgrading to bbPress if I logged in to WordPress (checking “Remember me”) and then went to bbPress and logged in, you could go back and forth with no further need to log in repeatedly. In fact, you could come back in the future and still not need to log in to either section.

    Since the upgrade, if I go to bbPress I must log in. Likewise, I must log in to WordPress. If I go to one of the two sites, I am logged out of the other site and must log in again.

    Just a nuisance thing, but I don’t think this is what the developer’s had in mind.

    Thank you.

Viewing 12 replies - 1 through 12 (of 12 total)

  • mrhoratio


    Make sure your SECRET_KEY in both WordPress and bbPress are the same. This is covered on this thread:

    It is the same. I learned all about the “secret key” during the bbPress installation. Most users will have never heard about it before and it is a bit baffling at first glance when it is asked for in the integration instructions. Anyway, it is exactly the same via cut and paste.

    Actually, if it was not, it would work as not integrated and therefore, I assume, like the previous version which worked “correctly”. You would stay logged in per “Remember me” in bbPress and WordPress. There is something else going on, I think.

    Has anyone installed an “integrated” version where it works properly? i.e. You can log into WordPress then log into bbPress and then go back to WordPress without logging in again. Please let me know. I realize, there is always a 99% chance that problems in coding are of my own making.



    I have the same problem



    I had the same problem, and thought I had the same secret keys, but actually didn’t when I checked my config files.

    Did you manually check your wp-config.php and bb-config.php files to make sure the secret keys are defined and are matching?

    The secret key is not mentioned period in the wp-config.php file, but is in the bb-config.php file. The WordPress secret is in the file (yep, the double forward slash is accurate – cut & paste) and does match exactly (I used Excel to do the match).

    If it is supposed to be in the wp-config.php file, please show me how the entire finished code should look (obviously my variables will differ but the structure will be the same). We might let the developer folks in on this too.

    Awaiting your reply…. Thank you!



    Add this line to your wp-config.php file.

    define(‘SECRET_KEY’, ‘Your bbPress Secret Key’);

    Replace Your bbPress Secret Key with your bbPress secret key. I believe the developers already know about this. By the way, make sure you have the latest WordPress installation. I believe secret key is a new functionality in WordPress 2.5.

    Well, now. Isn’t that special!!. It works perfectly.

    Thank you!

    BTW, I do have the latest version of WordPress installed (2.5.1) so I do not think this is included yet, but if those encountering (and noticing) the issue find your fix, it could not be easier.

    Thank you, again.



    You’re welcome. It’s included with 2.5.1, it’s just an optional entry, so I don’t think it would be in your default config file. But I think it is shown in the sample config file.

    Sorry, but that didn’t fix my problem. I’ve defined both SECRET_KEY in wp-config and bb-config as the same, as well as pulling in the new “secret” from the wordpress options page into bb-admin config panel.

    Still having the same issues of not being able to be logged into both at the same time.

    $bb->wp_table_prefix = 'wp__'; // your wordpress db prefix is
    $bb->wp_home = '';
    $bb->wp_siteurl = '';

    replace with the blog url.

    if your blog url is for example then don’t forget to add the WWW to it, but if it doesn’t has WWW, the don’t use it.

    The same happened to me after upgrading my wordpress to V.2.5.1

    The problem is that auth mechanism in wordpress (based on cookies) has changed and no more compatible with the bbPress’ one. I believe that the next bbPress release will fix it. However now there is only one way to solve the problem – to edit some piece of code(only few lines). This is the instruction:

    1) open your bbpress_dir/bb-includes/pluggable.php

    2) find function wp_validate_auth_cookie

    3) inside this function change next 2 lines of code

    $key = wp_hash($username . $expiration);

    $hash = hash_hmac(‘md5’, $username . $expiration, $key);


    $key = wp_hash($username . ‘|’ . $expiration);

    $hash = hash_hmac(‘md5’, $username . ‘|’ . $expiration, $key);

    4) find function wp_generate_auth_cookie

    5) inside this function change next 2 lines of code

    $key = wp_hash($user->user_login . $expiration);

    $hash = hash_hmac(‘md5’, $user->user_login . $expiration, $key);


    $key = wp_hash($user->user_login . ‘|’ . $expiration);

    $hash = hash_hmac(‘md5’, $user->user_login . ‘|’ . $expiration, $key);

    That’s all!

    NOTE! It’s only actual for wordpress 2.5.1 with bbpress

    Sam Bauers



    Cookies in WordPress 2.5.1 are compatible with cookies in bbPress

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.
Skip to toolbar