jaredhanson / jaredhanson/oauth2orize
Authorization Code redirect call in case of error
- Dominant language
- JavaScript
- Stars
- 3.5k
- Forks
- 472
- PR merge metrics
- No merged PRs in 30d
Description
Is there a mechanism to send to the redirect_uri some custom query parameters in case of error?
(I'm talking about https://localhost:8080/oauth2/authorize/decision endpoint)
### Expected behavior
In case there is an error on
```
server.grant(oauth2orize.grant.code((client, redirectUri, user, ares, done) => {...});
```
it should call the redirect_uri with an error description as a query parameter.
### Actual behavior
Instead, a json response containing the error description is returned.
```
{"error":"server_error","error_description":"The database service encountered an unexpected error."}
```
Contributor guide
Research direction
Start at the OAuth2 /authorize/decision endpoint and the server.grant(oauth2orize.grant.code(...)) flow described in the issue. Trace how errors become the current JSON response and compare that behavior with the requested redirect_uri error query parameters. Done means the intended error response behavior is defined and covered for authorization-code failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, authentication
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100