openid-connect-generic icon indicating copy to clipboard operation
openid-connect-generic copied to clipboard

Hook in error_redirect

Open grahamspr86 opened this issue 3 years ago • 1 comments

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.

grahamspr86 avatar May 15 '21 22:05 grahamspr86

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.

daggerhart avatar May 15 '21 23:05 daggerhart