CognitoIDP: fixed initiate_auth when refresing token (#5453)

This commit is contained in:
Dalibor 2022-09-07 20:39:34 +02:00 committed by GitHub
parent e76ffb3409
commit dbef197de8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1608,14 +1608,14 @@ class CognitoIdpBackend(BaseBackend):
)
user_pool = None
client = None
for p in self.user_pools.values():
if client_id in p.clients:
user_pool = p
client = p.clients.get(client_id)
if user_pool is None:
raise ResourceNotFoundError(client_id)
client = p.clients.get(client_id)
if auth_flow is AuthFlow.USER_SRP_AUTH:
username = auth_parameters.get("USERNAME")
srp_a = auth_parameters.get("SRP_A")