aws / aws/chalice

How to customize respone for AuthResponse when token is expired?

Open
#1,810 1 comment 1 reaction 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.