Website Construction

multi-site conection (Sigle login for multiple sites)

Submitted by shadow89, , Thread ID: 102598

Thread Closed
shadow89
Junior Member
Level:
1
Reputation:
0
Posts:
72
Likes:
5
Credits:
79
30-09-2018, 06:05 AM
This post was last modified: 30-09-2018, 06:11 AM by shadow89
#1
So... I'm going to be working on a website that will consist of multiple sites conected as one large website. (ex: domain.com,item1.domain.com, item2.domain.com) but I want to set it up where it onlyrequires to sign into any of the sites (connected accounts) and not have to sign in again when switching from(let's say) domain.com to item1.domain.com I know wordpress multi site is an option, but I honestly like to say away from wordpress if possible and I know it can be done. I'm guessing it'sdatabase related ssuebut not sure on how to go at it as I've never done this kind of connection before and figured I'd see if someone on here has the answers I need.
A Shadow On The wall, A Ghost In The Fog..

RE: multi-site conection (Sigle login for multiple sites)

Moneytac
Novice
Level:
0
Reputation:
0
Posts:
20
Likes:
1
Credits:
14
06-10-2018, 06:44 PM
#2
30-09-2018, 06:05 AM
shadow89 Wrote:
So... I'm going to be working on a website that will consist of multiple sites conected as one large website. (ex: domain.com,item1.domain.com, item2.domain.com) but I want to set it up where it onlyrequires to sign into any of the sites (connected accounts) and not have to sign in again when switching from(let's say) domain.com to item1.domain.com I know wordpress multi site is an option, but I honestly like to say away from wordpress if possible and I know it can be done. I'm guessing it'sdatabase related ssuebut not sure on how to go at it as I've never done this kind of connection before and figured I'd see if someone on here has the answers I need.

Look into prefixes for databases.. ex: app1_db, app2_db... All sites point to one db, prefixes determine what site/app they login from etc...

RE: multi-site conection (Sigle login for multiple sites)

shadow89
Junior Member
Level:
1
Reputation:
0
Posts:
72
Likes:
5
Credits:
79
OP
06-10-2018, 10:40 PM
#3
06-10-2018, 06:44 PM
Moneytac Wrote:
Look into prefixes for databases.. ex: app1_db, app2_db... All sites point to one db, prefixes determine what site/app they login from etc...

Ok, I'll do that thanks. I knew there was a way to do it though the database but just wasn't fully sure lol
A Shadow On The wall, A Ghost In The Fog..

RE: multi-site conection (Sigle login for multiple sites)

nodgear
Dead inside
Prime
Level:
1
Reputation:
54
Posts:
482
Likes:
43
Credits:
28
06-10-2018, 11:01 PM
#4
Put your login system on login.domain.com
call your login classes in any page, including then with php include once
you'll also need a cookie to save the login state, so you do the same thing.
put the session cookie on your login subdomain and require it
~Thank youYuun

RE: multi-site conection (Sigle login for multiple sites)

dev2indy
Closed Account
Level:
0
Reputation:
0
Posts:
25
Likes:
1
Credits:
18
15-06-2019, 03:11 PM
#5
Nice job. good luck with it
Nice job. good luck with it

RE: multi-site conection (Sigle login for multiple sites)

Icreg
Newbie
Level:
0
Reputation:
0
Posts:
12
Likes:
0
Credits:
16
20-06-2019, 11:42 PM
#6
I think youll need to look at Remote Database Access also to ensure that requests can be made from external servers for authentication etc

RE: multi-site conection (Sigle login for multiple sites)

redstormj
Newbie
Level:
0
Reputation:
0
Posts:
16
Likes:
0
Credits:
9
09-07-2019, 02:43 AM
#7
There are many ways to achieve what you want. If you are looking for the "appropriate" way to structure it, I would suggest to look up SSO (or Single Sign On) which is (as a concept) what you are looking for.

You need to keep in mind how Cross-Origin Resource Sharing (CORS) works as based on your domain structure you will likely encounter issues with it. Specifically, if you have xyz.domain.com then abc.domain.com will NOT necessarily share resources with the prior (because of CORS). You can configure your domains to accept resource sharing from any number of sources but you then have to keep security in mind while you do that.

Long story short, you can achieve what you want very simply if all you are after is a proof of concept, but my advise is always to keep things correct and secure and as such I strongly recommend you look into SSO.

RE: multi-site conection (Sigle login for multiple sites)

leonkont
Newbie
Level:
0
Reputation:
0
Posts:
12
Likes:
0
Credits:
15
25-09-2019, 10:39 PM
#8
Nice share, I will not be using I personally. But I'm sure a lot of people will find it useful.

Users browsing this thread: 1 Guest(s)