-
This was very easy to setup and use, but for a few of our use cases we'd like to specify an arbitrary redirect URL after authentication. That is, we'd like to direct the newly authenticated user to a page that is not necessarily the page they logged in from. For example, we use an oAuth plugin that allows us to build a URL like: Can we achieve something similar with OpenID? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@corypina there are 2 shortcodes you can use, one to generate a login button and one to generate an authentication URL that both allow specifying a redirect URL to be used after authentication. The redirect URL is stored as a part of the state stored as a transient. Since redirect URLs can't be passed to the IDP and then sent back to the OIDC "client", and cookies aren't stored reliably when caching services are used, the redirect needs to be managed in a reliable way on the WordPress site. |
Beta Was this translation helpful? Give feedback.
@corypina there are 2 shortcodes you can use, one to generate a login button and one to generate an authentication URL that both allow specifying a redirect URL to be used after authentication. The redirect URL is stored as a part of the state stored as a transient. Since redirect URLs can't be passed to the IDP and then sent back to the OIDC "client", and cookies aren't stored reliably when caching services are used, the redirect needs to be managed in a reliable way on the WordPress site.