networknt / light-oauth2

A fast, light and cloud native OAuth 2.0 authorization microservices based on light-4j
Apache License 2.0
313 stars 75 forks source link

potential NPE when users follow the tutorial with curl commands #321

Closed stevehu closed 3 years ago

stevehu commented 3 years ago

When users follow the tutorial with curl commands, they might not follow the steps from code to token. It might cause the token service to throw an NPE as the authorization code doesn't exist. In a programming world, this won't happen as the authorization code and token retrieval should be at the same time.

We need to update the handler to output an easy-to-understand error code.

Please double-check the kafka-oauth as well for the same issue.

stevehu commented 3 years ago

potential NPE when users follow the tutorial with curl commands light-oauth2 master