Mirroring Site, but login not working anymore (cross domain)

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

If you wish to attach one or more files enter the details below.

Maximum filesize per attachment: 1 MiB.

Expand view Topic review: Mirroring Site, but login not working anymore (cross domain)

Re: Mirroring Site, but login not working anymore (cross domain)

by debcat24 » Wed Mar 02, 2022 2:20 pm

Thanks for your example, would it be possible to chat privately ?

Re: Mirroring Site, but login not working anymore (cross domain)

by axew3 » Tue Mar 01, 2022 6:36 pm

So here we go with an example, or i think i go to mess up not understanding.
I have a test site old domain my infamous w3it.org.
So i installed there Woocommerce, WP, and phpBB.

Now i linked the w3it.org plugin db connection to the axew3.com database, and i have setup the integration as NOT LINKED USERS.
The result i have is that of course WP at w3it.org run as independent and just use db connections values to retrieve forum's posts that display on widgets or shortcodes and are pointing to axew3.com.

But there is no issue with any user into this site, that is completely different from axew3.com.
I created at w3it.org an user
crossdomain and pass crossdomain
as test that you can try to login with credentials both into WP default or woocommerce login to test that all is working fine:
https://www.w3it.org/main/my-account/
or
https://www.w3it.org/main/wp-admin

could you point me to what instead are you doing that return you the wrong result, that i have not understand?
It is something else that leads you to the login redirect problem you have?

Re: Mirroring Site, but login not working anymore (cross domain)

by axew3 » Tue Mar 01, 2022 5:35 pm

Ok got it, let see ... but i start to think that your problem is something else

...ps i hope you mean as not linked users mode, because if not i still have not well understand maybe what you try to do :cry:

Re: Mirroring Site, but login not working anymore (cross domain)

by debcat24 » Tue Mar 01, 2022 3:20 pm

Since you're using the phpbb config details and some of the WP would it be possible to change the WP domain url to be relative ?

Since the phpbb login is also using cookie information to login, so having two different domains like i showed you previously, would still have the issue of redirection to the staging site.. even if the url of wp was changed to relative correct?

Re: Mirroring Site, but login not working anymore

by axew3 » Tue Mar 01, 2022 2:14 pm

/wp-content/plugins/wp-w3all-phpbb-integration/wp_w3all.php
on top of the file, there are ALL the vars used.
There is momentary mix due to the switch for the new way to get/store phpBB db connection values since last versions and the old plugin way that was using the phpBB config file inclusion.

But these values are not used to redirect anywhere, default wp values are used, and the phpBB URL setting you setup into plugin admin (that is used to point widgets and shortcodes links that points to phpBB)

about the domain:
it is extracted from phpBB config:
private static function w3all_get_phpbb_config(){
into
/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all-phpbb.php

p.s since you use this for free
In your plugin scripts
it is also your

Re: Mirroring Site, but login not working anymore

by debcat24 » Tue Mar 01, 2022 12:17 pm

axew3 wrote: Tue Mar 01, 2022 10:46 am The integration code is intended for integrations on domain or sub.domains and not cross domain.
You are linking the staging site, that reside into domain livedomain.com, to a phpBB that is into another domain domain.com.
The unique solution for this is to setup the integration as not linked users (activate option into plugin admin).
Not sure if will work, this aspect i will check and clear before 2.5.9 release, fixing this aspect if still it is not completely (not considered/tested by long time).
But this will not anyway fix the fact, that the integration with linked users, will work only on same domains.
Your case is

staging.livedomain.com
that is not subdomain of
.domain.com/livedomain

so to test with linked users, you have to install also phpBB somewhere in livedomain.com
or subdomains like for example staging.livedomain or asite.livedomain

substantially, the same domain or sub.domain where wp reside

[EDITED]
I'm not understanding you completely.. I am only using one database that is located on the staging site. Therefore im not linking the users I'm using the same database. The phpbb is only saved on the staging site as I cannot install this on the mirrored site. In your plugin scripts which variable is being used to save the domain name and being used as a redirect after user clicks on the submit button of the login please :) ?

Top