I have an umbrella app with multiple web phx apps.
I want to be able to allow users to change sites within the umbrella and remain logged in, cross domains.
Will the master_proxy pattern allow this?
Is there some method Phx web apps can share sessions?
Do I need to implement an oauth provider / client or saml or some other sso?
IMHO, yes there is easy way to share session between phoenix app,
- my site save 1 cookie value and accessible from the other site (in same domain and same cookie name)
- in the backend i use redis for centralized session management, handing login expire, knowing logged username by cookie id, etc
- you can easily log out any user just by remove redis key by username / user_id
thanks for the feedback, but I want domain1.com domain2.com domain3.com umbrella apps sso via some kind of phoenix umbrella app feature
I know it can be done with site1.commondomain.com site2.commondomain.com site3.commondomain.com
HTTP protocol does not allow sharing cookies across entirely different domains. You have to work it around somehow.
Or, you can implement a login page, let’s say on domain1.com that sets cookie on domain1.com and briefly redirects to domain2.com login page which automatically sets cookie for domain2.com and redirect to domain3.com and sets cookie for that domain and redirects back user to domain1.com login success page.
The problem you have on hand is not an umbrella project problem at all. This is precisely the same problem if you have single instance of say Wordpress site using 3 different domains. Sessions handled on domain1.com are not visible on domain3.com.