Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5839593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:36:22+00:00 2026-05-22T11:36:22+00:00

The Situation I have three websites that all used to be the same one.

  • 0

The Situation

I have three websites that all used to be the same one. As a result, they use a single database for user administration and authentication. Unfortunately, they are very distinct websites and have grown to include drastically different features.

When all three sites were just one site, we used a nifty layout switcher that keyed on the requested URL to determine which stylesheets to use. But if you logged in to domain1.com with a user from domain2.com, the server would just swap the URL for you without a problem.

As we added features to one site, we needed to split the three into different systems to keep from stepping all over ourselves. Adding a feature to domain1 would break an unrelated system on domain3, so keeping things separate was smarter. But we kept the same user database because it’s tied in to our licensing and subscription systems.

Now, we want to begin using SSL/TLS to protect the sites … meaning they’re transferred over HTTPS rather than HTTP.

Using HTTP, we didn’t have too many problems bouncing users from one site version to another. You could log in to any of the three sites, the server would detect which site you were supposed to be on, and would kick you over there. Since we’re using a State Server for session management, you didn’t lose anything in the transfer, either (same user database, same session ID, same session).

Using HTTPS, we lose this when we kick users from one site to another. At the moment, the best we can do is display a pop-up and explain "You meant to log in to domain2.com … please update your bookmarks and log in again" before kicking them to the right domain. This works, but it’s an inelegant solution, frustrates the end users, and it really just sloppy.

Ideal Solution

Ideally, users would be automatically logged in to the site they’re being transferred to once they get there. So:

  • Log in to domain1.com with a user account from domain2.com
  • Get a popup explaining your mistake and asking you to update your bookmarks
  • Be automatically transferred to domain2.com and logged in as if you’d gone there to begin with.

Original Approach

The first idea we had to accomplish this was to redirect the user and append an ID of some kind to the URL and fetch the appropriate GET parameter when they get to the new site. While this works and we can log people in … it’s very insecure. You’re basically creating a token anyone could use to authenticate as that user and passing it over the wire where it could be intercepted and impersonated.

OpenID Approach

What I’m thinking now, and I’m not even sure it will work (hence the question), is to use some variation of OpenID. Both domain1.com and domain2.com are on our servers, under our control, and using our SSL certificates. We have full access to the database and, once we know which session to restore, can restore a user’s session once logging them back in after the site redirect.

When I’ve used OpenID in the past, it’s taken this format:

  1. Go to Site A I want to use and click Log In
  2. Be redirected to the login page for Site B, where I already have an account
  3. Log in to Site B and grant permission for Site A to use my information
  4. Be redirected to the authenticated portion of Site A

I want our system to replicate steps 3-4 of that process. Basically:

  1. Go to domain1.com and log in (you already have an account)
  2. Read a message about fixing your bookmarks and click OK to be redirected to the right site.
  3. Be redirected to the authenticated portion of domain2.com

From what I’ve ready about OpenID thus far, this seems possible. And I’ve been reading up on OpenID and OAuth for a couple of days now to figure this out. But every solution, tutorial, and manual I can find describes a fully-fleshed-out OpenID server. We don’t need people to use external OpenIDs to authenticate to our system, and we don’t want to become an OpenID provider either. We just want to create a solution that works following the above description.

So, is this possible using OpenID? Which parts of the protocol will we need to flesh out to make it work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T11:36:23+00:00Added an answer on May 22, 2026 at 11:36 am

    You don’t necessarily need OpenID to log the user simultaneously into multiple domains. You can just generate a “signed redirect” from domain1.com to domain2.com with an “assertion” as one of the parameters on the url to domain2.com

    The assertion should contain the userid, a timestamp, and a signature generated using a shared secret between domain1 and domain2. In order to prevent replay attacks, domain2 should verify that the timestamp is relatively recent (10 minutes). The signature should be generated by hashing the assertion with the shared secret. The signature enables domain2 to verify that domain1 generated the assertion, assuming that the shared secret is only known between domain1 and domain2.

    At a high level, the mechanism I described is equivalent to generating an “unsolicited assertion” in the SAML world. Unsolicited assertions are theoretically supported in OpenID, but I’ve never seen it implemented in practice.

    If you haven’t implemented this sort of Single Sign On (SSO) technique before, you should be very careful, as incorrect implementations can potentially allow attackers to login to domain2 as any user.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a box in one of my websites that has a these property:
Whenever I have a library that use across different websites/ applications I've always just
I have the following situation: There is one custom view inside of the first
Situation: I have some persons with certain skills and they can/might belong to more
Let me describe my situation: We are developing a web application that creates websites.
We have a situation where we are calling a function on a API that
I have this situation: There are a login page with a login form (form
Situation is you have to develop an application against an Active Directory Tree. Want
Let's say I have a situation in Silverlight where there is a background thread
I have the following situation. Assuming there are 3 systems: A,B,C and A is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.