Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
It might be overkill but WordPress Multisite essentially gives you this kind of behaviour. Have you looked into that at all?
-
fredrf15238y@samk I am developing this from scratch, wordpress was used as an example, to ilustrate ehat I am trying to achieve
-
I assume you want a single login page for your clients which redirects them after login to their website demo. Right?
-
Cruiser14998yyou could store the website the user should be directed to in the db along side the login info and just retrieve that after a successful login
-
cahva10138yWell its just matter of mapping the subdomain to a route. For example someuser.example.com would map to example.com/account/someuser. Its all behind the scenes so user wont see the actual route. We do this currently with our nodejs/express app. Login should just redirect to accounts subdomain after successfull login.
-
fredrf15238y@cahva ok nice! I like that idea
Something like the account as the slug, and something like a "db selector" after login...
FYi: I'm using Laravel -
fredrf15238y@pixeltherapy thank you for the suggestion, but I used WP as an example...
I'm building my own product -
@fredrf honestly I would do something like @Cruiser said. @cahva had a pretty good method too.
Personally, I'm a .net developer and I was thinking of doing exactly what @Cruiser said.
Ie: when the user creates an account, generate a sub-domain and put that in the db. Then, once the user logs in, they will be redirected to their exclusive sub-domain.
When the user erases/de-activates thier account, delete the sub-domain.
It should be pretty straight forward. I think you may be over complicating it if your having problems. It's easy to over complicate things IMO. -
fredrf15238y@champion01 its fairly easy to overcomplicate things!
I like both suggestions!
The subdomain redirect has the least impact on development right now...
I'll have to think this one through -
fermac1128ySubdomains sound like the simpler option, but might become an issue in the future.
Where I work, we have an unified dashboard for all our products and the very first approach was to use sub domains, but when a client asked to merge and share contents between accounts, we had to go for a complete redesign.
So, we built an ACL to allow us to customise every single variable, with layouts based on templates, so we can customise every single aspect of each view.
That may sound to over complicate a simple task, but we could have spared spending thousands of euros in a full redesign... -
fredrf15238y@fermac yeah, Laravel allows me to create some kind of ACL through the middleware...
I was thinking about going that way.
I have to consider features (enable/disable, for each product version) and URL formating (mantaining a RESTfull way)
I am comming to the ACL route...(it also avoids the deployment of several subdomains and the backend work it will generate) -
swazza898ySince you are building this from scratch, may I suggest taking a look at JASIG's CAS server. We built something similar to what you want to build. It was for our company's internal apps. A unified portal with single sign on access to all the apps. For ex, we had app1.mycompany.com, app2.mycompany.com, etc. signing into or out of app1 or app2 would sign me into or out of all the other apps. And CAS has good client libraries in various languages and integration was a breeze for us. Most of our apps were built on either the jvm or on node and our developers seemed to have enjoyed the experience.
-
fermac1128yWe used our own implementation of JWT for the effect, if it helps.
There's plenty of libraries to integrate it to all major languages.
Related Rants
-
Sefie13Implementing the application exactly like the client specified, because they won't listen.
-
TCPizza28assignment: use winAPI to create a "virus" that put itself in autorun and does nothing. me, a curious student...
-
jdevs17I am Computer Science Student Yesterday I asked question to my classmates, what is Linux, here's some(non-fo...
Guys, I have a question and I was wondering if you could help me here...
I was thinking, is there a way to have a user login, and behind the scenes it will take to its "website"?
I.e.: Lets say, I have something like wordpress but for each instance, should I deploy a subdomain or, can I create a single entry point and then route the user to its specific wordpress instance?
Can you advise? Suggestions?
Thank you in advance
undefined
architecture
question