Recent Posts

Restore Viewstate After Oauth2 Redirect

Written by whein on Feb 21 2017, 5:54 PM in YAAS Discoveries.

In single-page apps it tends to be difficult to handle "viewstate". Ionic2 has improved this significantly as the URL is no longer the "main" driver for the viewstate, it is just another means to support bookmarking and sharing, for example.
Combining Ionic2 with OAuth2 authentication, we ran into the issue that redirect URLs must not be dynamic as they are to be registered with the IdP. For example: http://www.my-ionic-app.com/. If our application now tries to handle "unauthenticated" requests gracefully, it may happen that view states like http://www.my-ionic-app.com/#/some/data require authentication - but OAuth "indirect flow" throws us back on the root page.

Read more...