Skip to content

Commit

Permalink
fix(cognito-idp): avoid KeyError on unexisting refresh token (#7563)
Browse files Browse the repository at this point in the history
  • Loading branch information
serozhenka authored Apr 6, 2024
1 parent 7fcea4a commit 5c1d1d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moto/cognitoidp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1964,7 +1964,7 @@ def initiate_auth(
if not refresh_token:
raise ResourceNotFoundError(refresh_token)

res = user_pool.refresh_tokens[refresh_token]
res = user_pool.refresh_tokens.get(refresh_token)
if res is None:
raise NotAuthorizedError("Refresh Token has been revoked")

Expand Down

0 comments on commit 5c1d1d0

Please sign in to comment.