Sometimes you want to put a URL on your site that deep links a user to a particular piece of content. Usually, you just need to put that link. However, if you have to sign the user in first then that will require you to format the URL with a sign in link.
To do this with OAuth 2 SSO you will need to add a special state parameter with the target. Here is the basic process.
- Make a JSON object with a
target key that points to the URL you want the user redirected to after they sign in.
- Base 64 encode your JSON string.
- Pass that value to the
state query string parameter of
That URL will send the user to your authenticate page and then redirect them to the appropriate place after they've authenticated against your OAuth 2 server.
Note that this should work for custom OAuth 2 addons, by substituting your custom key for