Do you need to add a URL in your community that links a user to a specific piece of content? Do you have the additional stipulation that the user must first be signed in? This requires more than a typical link: the URL must be formatted with a sign in link.
- To do this with OAuth 2 SSO, you must 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 /entry/oauth2-redirect
.
This 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: This should work for custom OAuth 2 addons by substituting your custom key for oauth2
in /entry/oauth2-redirect
.