Skip to content

Commit

Permalink
feat: allow control of which errors flow back to client's redirect_uri
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Mar 4, 2021
1 parent b591d7f commit 219cd45
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 3 additions & 2 deletions recipes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ If you or your business use oidc-provider, or you need help using/upgrading the

---

- [Allowing HTTP and/or localhost for implicit response types](implicit_http_localhost.md)
- [Claim configuration](claim_configuration.md)
- [Client-based CORS origins](client_based_origins.md)
- [Decentralized claims](decentralized_claims.md)
- [Redirect URI wildcards](redirect_uri_wildcards.md)
- [Allowing HTTP and/or localhost for implicit response types](implicit_http_localhost.md)
- [Skipping consent](skip-consent.md)
- [Skipping consent](skip_consent.md)
- [Render instead Redirect on invalid_request](skip_redirect.md)
- ... got something worthy of being here? Submit a PR with a new recipe to help others.

[support-sponsor]: https://github.com/sponsors/panva
File renamed without changes.
11 changes: 11 additions & 0 deletions recipes/skip_redirect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Render invalid_request errors

- built for version: ^7.1.0

```js
const { errors } = require('oidc-provider);
Object.defineProperty(errors.InvalidRequest.prototype, 'allow_redirect', { value: false });
```
This will make all `invalid_request` errors that would normally redirect back to the
client's redirect_uri (when conditions allow) render instead.

0 comments on commit 219cd45

Please sign in to comment.