I've been able to successfully setup multiple Ember applications with shared Ember Simple Auth cookie based authentication. The next step of my journey is to setup proper redirects between applications. Hear me out.
Scenario A (this works out of the box, yay!)
- User tries to access
domain.com/deep/link/resource
- User is NOT logged in
- User is redirected to
domain.com/login
to login via single sign-on component that uses Ember Simple Auth to save cookie with token - After successful login user is redirected back to
domain.com/deep/link/resource
via previous transition
Scenario B (this works out of the box, yay!)
- User tries to access
app-b.domain.com/deep/link/resource
- User is already logged in via Ember Simple Auth cookie with token
- User can access
app-b.domain.com/deep/link/resource
route
Scenario C (this is what I need to achieve)
- User tries to access
app-a.domain.com/deep/link/resource
- User is NOT logged in
- User is redirected to
domain.com/login
to login via single sign-on component that uses Ember Simple Auth to save cookie with token - After successful login user is redirected back to
app-a.domain.com/deep/link/resource
via previous transition onapp-a
subdomain
Any help or guidance would be much appreciated. I wonder if I can achieve Scenario C with Ember Simple Auth only, or if I need to write custom redirect logic in beforeModel
on subdomains, etc.