Add PoC support for an error redirect URL for OAuth errors.
This allows the default behaviour which is to redirect to the dashboard or splash screen to be overridden, e.g. to allow the user to return to the Settings screen on an OAuth error.
Note that the error redirect URL is not supported for the initial site setup as it's not needed there, it's only available for subsequent OAuth connections e.g. to provide additional scopes.
Relates to issue #8179.
Relevant technical choices
PR Author Checklist
[ ] My code is tested and passes existing unit tests.
[ ] My code has an appropriate set of unit tests which all pass.
[ ] My code is backward-compatible with WordPress 5.2 and PHP 7.4.
[ ] My code follows the WordPress coding standards.
[ ] My code has proper inline documentation.
[ ] I have added a QA Brief on the issue linked above.
Summary
Add PoC support for an error redirect URL for OAuth errors.
This allows the default behaviour which is to redirect to the dashboard or splash screen to be overridden, e.g. to allow the user to return to the Settings screen on an OAuth error.
Note that the error redirect URL is not supported for the initial site setup as it's not needed there, it's only available for subsequent OAuth connections e.g. to provide additional scopes.
Relates to issue #8179.
Relevant technical choices
PR Author Checklist
Do not alter or remove anything below. The following sections will be managed by moderators only.
Code Reviewer Checklist
Merge Reviewer Checklist