openid-connect-generic
openid-connect-generic copied to clipboard
Hook in error_redirect
Could we have a hook in error_redirect so we can redirect some place else other then wp_login_url
I would like to redirect to example.com/login_error/bad-claim which would be a custom error page for login issues.
We could probably do that easily enough. In the mean time, since we're using wp_redirect there is already a filter you can use -- https://developer.wordpress.org/reference/hooks/wp_redirect/
All of this plugin's error redirects contain the parts ?login-error=
and &message=
in the url, so it shouldn't be impossible for you to use the core wp_redirect filter somewhat reliably by detecting that login-error
and message
are in the $location
string.