portalUser belongs to multiple portals bypass login if already logged into one

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • czcpf
    Senior Member
    • Aug 2022
    • 160

    portalUser belongs to multiple portals bypass login if already logged into one

    Hello,

    Scenario:

    portalUser belongs to portalA, and portalB

    portalUser is logged into portalA

    in some view I have some code to go to portalB.

    window.location.href = {portalBUrl};

    Current Result:

    If portalUser has not logged in to portalB, login screen is shown
    If portalUser has logged into portalB, portal home screen is shown. I suppose this is cached in my browser somehow


    Desired Result:
    If portalUser has not logged into portalB, home screen is shown

    To summarize, what client side code could I implement to automatically authenticate the portalUser to portalB given that they are already authenticated to portalA and belong to both portals?

    I see there is some authentication info in this.getStorage(). Is there someway to use this to login to portalB silently before calling window.location.href = {portalBUrl} ?

  • yuri
    Member
    • Mar 2014
    • 8845

    #2
    Are both portals on the same domain?
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment


    • czcpf
      czcpf commented
      Editing a comment
      Yes, but different subdomains (ie. portalA.example.com, portalB.example.com)

    • czcpf
      czcpf commented
      Editing a comment
      Is there any suggestion?
Working...