I was hoping someone might be able to provide on guidance on the best way to handle an expired server session?
I was hoping to have the following behavior, but haven't been able to make it work yet:
Any help is appreciated. Let me know if there is anything I can clarify. Thanks!
DataAdapterMixin's ensureResponseAuthorized method and maybe store the current route somewhere and then also override the ApplicationRouteMixin's sessionAuthenticated and redirect to the previously stored route if present.@marcoow, thanks for the response!
Yes, 1-3 are definitely working for me, I was just having trouble figuring out how to accomplish 4. I'll attempt what you suggest and update. Thanks again!!!
@marcoow, any recommendations on what would be an acceptable replacement for the behavior in application-route-mixin.sessionInvalidated()? Seems like I would need to change window.location.replace(Configuration.baseURL), since I don't think I'd be able to store the transition otherwise (please let me know if I'm missing something here). Thanks!
Yes, I think you'd want something like this:
if (!testing) {
if (/* identify your special case here */) {
// if you're in FastBoot, call transitionTo, otherwise window.location.replace
} if (this.get('_isFastBoot')) {
this.transitionTo(Configuration.baseURL);
} else {
window.location.replace(Configuration.baseURL);
}
}
Thanks for your help @marcoow!