How to customize respone for AuthResponse when token is expired?
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
I am using JWT tokens to authorize access to the API. I'm also adding an expiration to the tokens which works, but the response when trying to access an endpoint with an expired token is always
`"Message": "User is not authorized to access this resource"`
Is there any way to customize the response to let the user know the token is expired?
Contributor guide
Research direction
Start by reading the authentication and AuthResponse handling used for JWT-protected API endpoints, then check how expired tokens are passed through the AWS API Gateway response path. Confirm whether the requested expired-token message can be customized and identify the relevant tests or documentation needed to demonstrate the supported behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- api, authentication, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100