Skip to:
Content
Pages
Categories
Search
Top
Bottom

Where do I define USER_COOKIE, PASS_COOKIE, AUTH_COOKIE, SECURE_AUTH_COOKIE, LOG

  • I defined USER_COOKIE, PASS_COOKIE, AUTH_COOKIE, SECURE_AUTH_COOKIE, LOGGED_IN_COOKIE and TEST_COOKIE on my WP config for a single sign own with multiple WP hosted on a single domain + sub domain

    Can someone tell me where I can define USER_COOKIE, PASS_COOKIE, AUTH_COOKIE, SECURE_AUTH_COOKIE, LOGGED_IN_COOKIE and TEST_COOKIE in BBPress and how?

    Thanks

Viewing 14 replies - 1 through 14 (of 14 total)
  • AUTH_COOKIE, SECURE_AUTH_COOKIE, and LOGGED_IN_COOKIE are all done in the bb-config,php file, same as it’s in the wp-config.php file. The only catch is you name them with BB_ in front, so its:

    BB_AUTH_COOKIE

    BB_SECURE_AUTH_COOKIE

    BB_LOGGED_IN_COOKIE

    The rest I don’t think you need to define.

    Unfortunately adding these value breaks WP/BBPress login integration (Same value as wp-config without bb_ prefix on the variable)

    define(‘BB_AUTH_COOKIE’, ‘xxx’);

    define(‘BB_SECURE_AUTH_COOKIE’, ‘xxx’);

    define(‘BB_LOGGED_IN_COOKIE’, ‘xxx’);

    Thanks for the reply ipstenu

    You have to put them all in (and this is mentioned during the install and integration)

    define('BB_AUTH_KEY', 'xxx');
    define('BB_SECURE_AUTH_KEY', 'xxx');
    define('BB_LOGGED_IN_KEY', 'xxx');
    define('BB_NONCE_KEY', 'xxx');
    define('BB_AUTH_SALT', 'xxx');
    define('BB_LOGGED_IN_SALT', 'xxx');
    define('BB_SECURE_AUTH_SALT', 'xxx');

    You don’t have to define them all, in the settings.php if it’s not defined they get created for you in some respects for some of them. This will help you during integration.

    In fact anytime you use these defines you are saying to bbpress that the value your defining will manually override anything in the DB.

    A goal to have during integration is to try and let the apps do the most work. This way human error can be eliminated. Now there are always exceptions but on a ‘basic’ setup. So again, avoid defines unless otherwise specifically told to (say by the integration plugin or bbpress integration settings).

    Thanks for teh reply guys, but again, this is about overriding cookie setting, not _Auth

    xxxxxx_COOKIE

    Post your versions up. Fill out below:

    WP? WPMU?

    blog is subdomain? folder?

    bbpress .9? 1.0?

    Integration plugin ver?

    Both installation on WP (2.8)

    WP1 is on domain.com, and WP2 is on sub.domain.com (same domain name)

    Both allow single sign on between WP1 and WP2 with this on wp-config.php

    define(‘COOKIE_DOMAIN’, ‘.domain.com’);

    define(‘COOKIEPATH’, ‘/’);

    define(‘AUTH_SALT’, ‘6428746726478264’);

    define(‘LOGGED_IN_SALT’, ‘74829749827489237424’);

    define(‘AUTH_COOKIE’, ‘7482647263478623478’);

    define(‘SECURE_AUTH_COOKIE’, ‘985847584758475’);

    define(‘LOGGED_IN_COOKIE’, ‘98752975897435894375894’);

    define(‘TEST_COOKIE’, ‘8947519875894758495’);

    So I basically override the cookie also.

    Now I installed BBPress (1.0)

    These WP-CONFIG setting won’t work even I added BB_LOGGED_IN_COOKIE variable

    It only works with BBPress if i use these only

    define(‘COOKIE_DOMAIN’, ‘.domain.com’);

    define(‘COOKIEPATH’, ‘/’);

    define(‘AUTH_KEY’, ‘xxxxxxxxxxxxxxxxx’);

    define(‘SECURE_AUTH_KEY’, ‘xxxxxxxxxxxxxxxxx’);

    define(‘LOGGED_IN_KEY’, ‘xxxxxxxxxxxxxxxxxx’);

    define(‘NONCE_KEY’, ‘xxxxxxxxxxxxxxxx’);

    define(‘AUTH_SALT’, ‘xxxxxxxxxxxxxxxxx’);

    define(‘LOGGED_IN_SALT’, ‘xxxxxxxxxxxxxxxx’);

    But if I add anything with _COOKIE bbpress + wp signed on won’t work, if I take it out, it will with with BBPress but multiple WP single sing on won’t work

    Thanks guys

    Victoria


    chrishajer
    Participant

    @chrishajer

    vanesta, this was flagged as spam by akismet and I rescued it.

    Thanks Chris. Any pointer would be helpful in defining _COOKIE settings :)

    Regards

    Victoria

    Anyone could help? Thanks

    I’m not able to get WPMU 2.8.4 and BP 1 to SSO at all. I tried and can’t get it to work any help would be grateful.

    I have the multi-domain plugin setup and also have the bbpress-integrate plugin in the “plugins” directory.

    WP-Config.php

    /**

    * The base configurations of the WordPress.

    *

    **************************************************************************

    * Do not try to create this file manually. Read the README.txt and run the

    * web installer.

    **************************************************************************

    *

    * This file has the following configurations: MySQL settings, Table Prefix,

    * Secret Keys, WordPress Language, and ABSPATH.

    *

    * This file is used by the wp-config.php creation script during the

    * installation.

    *

    * @package WordPress

    */

    // ** MySQL settings – You can get this info from your web host ** //

    /** The name of the database for WordPress */

    Removed for Security

    /** The Database Collate type. Don’t change this if in doubt. */

    define(‘DB_COLLATE’, ”);

    define(‘VHOST’, ‘yes’);

    $base = ‘/’;

    define(‘DOMAIN_CURRENT_SITE’, ‘thisissite1.com’ );

    define(‘PATH_CURRENT_SITE’, ‘/’ );

    define(‘SITE_ID_CURRENT_SITE’, 1);

    define(‘BLOGID_CURRENT_SITE’, ‘1’ );

    /**#@+

    * Authentication Unique Keys.

    *

    * Change these to different unique phrases!

    * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}

    *

    * @since 2.6.0

    */

    define( ‘NONCE_KEY’, ‘&^YU8obCOZmNz)#udi$ghSLF’ );

    define( ‘AUTH_KEY’, ‘t0d87hpJOq!DBA#gp7VZ#dez’ );

    define( ‘AUTH_SALT’, ‘CdaJ42PU3iCsjehU(*h8V#6k’ );

    define( ‘LOGGED_IN_KEY’, ‘LihT(0OQBtTkw82^c0jmT4ub’ );

    define( ‘LOGGED_IN_SALT’, ‘NinP#50Uq(KU#LQ5h64on9v*’ );

    define( ‘SECURE_AUTH_KEY’, ‘UYi3SxHzUXE48E!vvggXv&s8’ );

    define( ‘SECURE_AUTH_SALT’, ‘c@p6I*b*hvcr8F^SMfr7JG^!’ );

    /**bbpress integration **/

    define(‘USER_COOKIE’, ‘wordpressuser’);

    define(‘PASS_COOKIE’, ‘wordpresspass’);

    define(‘COOKIEPATH’, $base);

    define(‘SITECOOKIEPATH’, ‘/’);

    define(‘COOKIE_DOMAIN’, ‘.thisissite2.com’); // same as bbPress

    /**#@-*/

    /**

    * WordPress Database Table prefix.

    *

    * You can have multiple installations in one database if you give each a unique

    * prefix. Only numbers, letters, and underscores please!

    */

    $table_prefix = ‘wp_’;

    /**

    * WordPress Localized Language, defaults to English.

    *

    * Change this to localize WordPress. A corresponding MO file for the chosen

    * language must be installed to wp-content/languages. For example, install

    * de.mo to wp-content/languages and set WPLANG to ‘de’ to enable German

    * language support.

    */

    define (‘WPLANG’, ”);

    // double check $base

    if( $base == ‘BASE’ )

    die( ‘Problem in wp-config.php – $base is set to BASE when it should be the path like “/” or “/blogs/”! Please fix it!’ );

    // uncomment this to enable wp-content/sunrise.php support

    //define( ‘SUNRISE’, ‘on’ );

    // uncomment to move wp-content/blogs.dir to another relative path

    // remember to change WP_CONTENT too.

    // define( “UPLOADBLOGSDIR”, “fileserver” );

    // If VHOST is ‘yes’ uncomment and set this to a URL to redirect if a blog does not exist or is a 404 on the main blog. (Useful if signup is disabled)

    // For example, the browser will redirect to http://examples.com/ for the following: define( ‘NOBLOGREDIRECT’, ‘http://example.com/’ );

    // Set this value to %siteurl% to redirect to the root of the site

    // define( ‘NOBLOGREDIRECT’, ” );

    // On a directory based install you must use the theme 404 handler.

    // Location of mu-plugins

    // define( ‘WPMU_PLUGIN_DIR’, ” );

    // define( ‘WPMU_PLUGIN_URL’, ” );

    // define( ‘MUPLUGINDIR’, ‘wp-content/mu-plugins’ );

    // Uncomment to disable the site admin bar

    //define( ‘NOADMINBAR’, 1 );

    define( “WP_USE_MULTIPLE_DB”, false );

    /* That’s all, stop editing! Happy blogging. */

    /** WordPress absolute path to the WordPress directory. */

    if ( !defined(‘ABSPATH’) )

    define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

    /** Sets up WordPress vars and included files. */

    require_once(ABSPATH . ‘wp-settings.php’);

    /**bbpress integration **/


    bb-config.php

    <?php

    /**

    * The base configurations of bbPress.

    *

    * This file has the following configurations: MySQL settings, Table Prefix,

    * Secret Keys and bbPress Language. You can get the MySQL settings from your

    * web host.

    *

    * This file is used by the installer during installation.

    *

    * @package bbPress

    */

    // ** MySQL settings – You can get this info from your web host ** //

    /** The name of the database for bbPress */

    Removed for security

    /**#@+

    * Authentication Unique Keys.

    *

    * Change these to different unique phrases!

    * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/bbpress/ WordPress.org secret-key service}

    *

    * Change these to different unique phrases!

    * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}

    *

    * @since 2.6.0

    */

    define( ‘BB_NONCE_KEY’, ‘&^YU8obCOZmNz)#udi$ghSLF’ );

    define( ‘BB_AUTH_KEY’, ‘t0d87hpJOq!DBA#gp7VZ#dez’ );

    define( ‘BB_AUTH_SALT’, ‘CdaJ42PU3iCsjehU(*h8V#6k’ );

    define( ‘BB_LOGGED_IN_KEY’, ‘LihT(0OQBtTkw82^c0jmT4ub’ );

    define( ‘BB_LOGGED_IN_SALT’, ‘NinP#50Uq(KU#LQ5h64on9v*’ );

    define( ‘BB_SECURE_AUTH_KEY’, ‘UYi3SxHzUXE48E!vvggXv&s8’ );

    define( ‘BB_SECURE_AUTH_SALT’, ‘c@p6I*b*hvcr8F^SMfr7JG^!’ );

    $bb->wp_table_prefix = ‘wp_’;

    $bb->wp_home = ‘http://thisissite2.com/&#8217;;

    $bb->wp_siteurl = ‘http://thisissite2.com/&#8217;;

    // Integrating with mu

    $bb->cookiepath = ‘/’;

    $bb->cookiedomain = ‘.thisissite2.com’; // leading . allows subdomain sharing

    $bb->usercookie = ‘wordpressuser’; // WPMU doesn’t hash cookies

    $bb->passcookie = ‘wordpresspass’; // WPMU doesn’t hash cookies

    // Load WordPress so we can use the same templates.

    define(‘WP_BB’, ‘true’);

    require_once(‘/home/content/82/4558682/html/wp-blog-header.php’);

    /**#@-*/

    /**

    * bbPress Database Table prefix.

    *

    * You can have multiple installations in one database if you give each a unique

    * prefix. Only numbers, letters, and underscores please!

    */

    $bb_table_prefix = ‘bb_’;

    /**

    * bbPress Localized Language, defaults to English.

    *

    * Change this to localize bbPress. A corresponding MO file for the chosen

    * language must be installed to a directory called “my-languages” in the root

    * directory of bbPress. For example, install de.mo to “my-languages” and set

    * BB_LANG to ‘de’ to enable German language support.

    */

    define( ‘BB_LANG’, ” );

    Josef, take out in wp-config

    /**bbpress integration **/
    define('USER_COOKIE', 'wordpressuser');
    define('PASS_COOKIE', 'wordpresspass');
    define('COOKIEPATH', $base);
    define('SITECOOKIEPATH', '/');
    define('COOKIE_DOMAIN', '.thisissite2.com'); // same as bbPress

    and bb-config

    $bb->wp_home = 'http://thisissite2.com/';
    $bb->wp_siteurl = 'http://thisissite2.com/';

    // Integrating with mu
    $bb->cookiepath = '/';
    $bb->cookiedomain = '.thisissite2.com'; // leading . allows subdomain sharing
    $bb->usercookie = 'wordpressuser'; // WPMU doesn't hash cookies
    $bb->passcookie = 'wordpresspass'; // WPMU doesn't hash cookies

    Use this plugin https://wordpress.org/extend/plugins/bbpress-integration/

    If you’re using MU you will get 4 lines, cookiehash, cookie_domain, sitecookiepath, and cookiepath.

    get the information from there and put it right AFTER this line in wp-config

    * @package WordPress
    */

    then paste only cookie_domain, sitecookiepath, and cookiepath in bb-config file. leave out cookiehash right after

    * @package bbPress
    */

    Then get new keys, use this link https://api.wordpress.org/secret-key/1.1/salt it has 8 keys put it in both like you did before. Don’t forget the BB_ prefix in bb-config.

    Clear your cache and cookies. Give it a try. if that doesn’t work then look in your BB dashboard and check your settings on wordpress integration. make sure if you left out “www” in wordpressd to leave it out on bbpress.

    Not working.

    The bbpress plugin didn’t give me a domain name so I added it in, but I had to leave it off of the wp-config because if I add it in then the primary domain (with a different domain name) can’t login correctly.

    Primary = theitsites.com (blog ID 1)

    Secondary = channeltechcenter.com (blog ID 15)

    Forum = channeltechcenter.com/forum

    This is how my config files look now:

    bb-config.php:

    define( ‘SITECOOKIEPATH’, ‘/’ );

    define( ‘COOKIEPATH’, ‘/’ );

    define( ‘COOKIE_DOMAIN’, ‘.channeltechcenter.com’ );

    /**#@+

    * Authentication Unique Keys.

    *

    * Change these to different unique phrases!

    * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/bbpress/ WordPress.org secret-key service}

    *

    * Change these to different unique phrases!

    * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}

    *

    * @since 2.6.0

    *psuedo keys for example.

    */

    define(‘AUTH_KEY’, ‘TTm1LH+ujM}EMaa*{~>?q|GCvQO&.Yi?UuXOTB}Y{eD78Ew;,v[,wMVy7AI8IW^i’);

    define(‘SECURE_AUTH_KEY’, ‘fv-=YGe08*cM>$7UkQUEp##.LU@{oE/1Y!!&fB<CSd1iuO(,OL=/1aFB::8[:-4U’);

    define(‘LOGGED_IN_KEY’, ‘v;F@8Oq+nF</b^|C{+:en&G/w-(d.gG(+ |;mlH%OlG+!`_|_&~EQvwV&+7#T5t=’);

    define(‘NONCE_KEY’, ‘!XG!+oY_BGgjPq;g^}@`3d{g7+Wtt0bFfHn5dx?>/Gu*O)U{QxZy|S3<:YR(N@b.’);

    define(‘AUTH_SALT’, ‘9|w7:dtp.e8ST$$ D!]l^lz~ue{Kln|R/o@-X|i0~o|?>s;[Sq#A4z*_gb[g#ZOZ’);

    define(‘SECURE_AUTH_SALT’, ‘EPtQFM)4AL^Z`QIN&v9{g,xtZxQCUz8M<F0B|YSkvfDTp>fhTIficKU/R h9lR%A’);

    define(‘LOGGED_IN_SALT’, ‘YReh`^4tc~-itnl!cNLeJ~EmF>+||Tn5nyiAv|i6{U^_CQOx=yz#>9aIiq?;-cBh’);

    define(‘NONCE_SALT’, ‘n[ZOFHB1^vX[|5&3Rq;NT%c.8^.NN71.(IR+8#Lt.(De5q5 ~=*V;C.Z1F|H[Bbj’);

    WP-Config.php:

    define( ‘SITECOOKIEPATH’, ‘/’ );

    define( ‘COOKIEPATH’, ‘/’ );

    /** The Database Collate type. Don’t change this if in doubt. */

    define(‘DB_COLLATE’, ”);

    define(‘VHOST’, ‘yes’);

    $base = ‘/’;

    define(‘DOMAIN_CURRENT_SITE’, ‘theitsites.com’ );

    define(‘PATH_CURRENT_SITE’, ‘/’ );

    define(‘SITE_ID_CURRENT_SITE’, 1);

    define(‘BLOGID_CURRENT_SITE’, ‘1’ );

    /**#@+

    * Authentication Unique Keys.

    *

    * Change these to different unique phrases!

    * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}

    *

    * @since 2.6.0

    */

    define(‘AUTH_KEY’, ‘TTm1LH+ujM}EMaa*{~>?q|GCvQO&.Yi?UuXOTB}Y{eD78Ew;,v[,wMVy7AI8IW^i’);

    define(‘SECURE_AUTH_KEY’, ‘fv-=YGe08*cM>$7UkQUEp##.LU@{oE/1Y!!&fB<CSd1iuO(,OL=/1aFB::8[:-4U’);

    define(‘LOGGED_IN_KEY’, ‘v;F@8Oq+nF</b^|C{+:en&G/w-(d.gG(+ |;mlH%OlG+!`_|_&~EQvwV&+7#T5t=’);

    define(‘NONCE_KEY’, ‘!XG!+oY_BGgjPq;g^}@`3d{g7+Wtt0bFfHn5dx?>/Gu*O)U{QxZy|S3<:YR(N@b.’);

    define(‘AUTH_SALT’, ‘9|w7:dtp.e8ST$$ D!]l^lz~ue{Kln|R/o@-X|i0~o|?>s;[Sq#A4z*_gb[g#ZOZ’);

    define(‘SECURE_AUTH_SALT’, ‘EPtQFM)4AL^Z`QIN&v9{g,xtZxQCUz8M<F0B|YSkvfDTp>fhTIficKU/R h9lR%A’);

    define(‘LOGGED_IN_SALT’, ‘YReh`^4tc~-itnl!cNLeJ~EmF>+||Tn5nyiAv|i6{U^_CQOx=yz#>9aIiq?;-cBh’);

    define(‘NONCE_SALT’, ‘n[ZOFHB1^vX[|5&3Rq;NT%c.8^.NN71.(IR+8#Lt.(De5q5 ~=*V;C.Z1F|H[Bbj’);

    Please feel free to email me

    joseff at theitsites d0t c0m

    I noticed that I didn’t Add BB_ to the salt definitions. Added them and still doesn’t work.

    Fixed bb-config.php to read:

    define(‘BB_AUTH_KEY’, ‘TTm1LH+ujM}EMaa*{~>?q|GCvQO&.Yi?UuXOTB}Y{eD78Ew;,v[,wMVy7AI8IW^i’);

    define(‘BB_SECURE_AUTH_KEY’, ‘fv-=YGe08*cM>$7UkQUEp##.LU@{oE/1Y!!&fB<CSd1iuO(,OL=/1aFB::8[:-4U’);

    define(‘BB_LOGGED_IN_KEY’, ‘v;F@8Oq+nF</b^|C{+:en&G/w-(d.gG(+ |;mlH%OlG+!`_|_&~EQvwV&+7#T5t=’);

    define(‘BB_NONCE_KEY’, ‘!XG!+oY_BGgjPq;g^}@`3d{g7+Wtt0bFfHn5dx?>/Gu*O)U{QxZy|S3<:YR(N@b.’);

    define(‘BB_AUTH_SALT’, ‘9|w7:dtp.e8ST$$ D!]l^lz~ue{Kln|R/o@-X|i0~o|?>s;[Sq#A4z*_gb[g#ZOZ’);

    define(‘BB_SECURE_AUTH_SALT’, ‘EPtQFM)4AL^Z`QIN&v9{g,xtZxQCUz8M<F0B|YSkvfDTp>fhTIficKU/R h9lR%A’);

    define(‘BB_LOGGED_IN_SALT’, ‘YReh`^4tc~-itnl!cNLeJ~EmF>+||Tn5nyiAv|i6{U^_CQOx=yz#>9aIiq?;-cBh’);

    define(‘BB_NONCE_SALT’, ‘n[ZOFHB1^vX[|5&3Rq;NT%c.8^.NN71.(IR+8#Lt.(De5q5 ~=*V;C.Z1F|H[Bbj’);

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