after federated authentication, redirect to originally requested url

peter.swallow picture peter.swallow · Jul 1, 2013 · Viewed 8.6k times · Source

We've setup federated security using ThinkTecture server.

When a user wishes to access a particular URL, they get redirected to the Identity Provider Server (IDP), they login, get authenticated.

Then, the IDP server will redirect the user back to the "Redirect URL" specified in the configuration for that Relying Party.

Instead, I want it to be redirected to the originally requested URL.

Is this possible? I've read a little about the wreply parameter, but not sure how I use this and intercept the authentication levels calls on the original web server, before the redirect.

Update I've realised that my problem is due to my url containing a hash, e.g. http://domain.com/#customer/123 and nothing after the hash is passed into the redirect url within WIF. See my answer below for more details.

Answer

Brock Allen picture Brock Allen · Jul 1, 2013

It's up to your app to remember context info like this in the wctx param. If you're using WIF in the RP then this should be done automatically.