warrant icon indicating copy to clipboard operation
warrant copied to clipboard

Enabling device tracking breaks renew_access_token()

Open nueverest opened this issue 8 years ago • 3 comments

When I setup my cognito user pool for testing I setup device tracking. That caused renew_access_token() to fail with a 300 error and cryptic NotAuthenticated exception.

How do I modify this to allow for device tracking?

Warrant is teaching me a lot. Thank you for building it.

nueverest avatar May 29 '17 01:05 nueverest

The answer is here: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html

For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: USERNAME (required), SECRET_HASH (required if the app client is configured with a client secret), REFRESH_TOKEN (required), DEVICE_KEY

Is there a plan to implement this?

nueverest avatar May 29 '17 03:05 nueverest

amazon-cognito-identity-js is using local storage to cache deviceKeyKey, randomPasswordKey, deviceGroupKeyKey

Do we need to do the same? If yes, what kind of cache should warrant use? https://github.com/aws/amazon-cognito-identity-js/blob/3e6cb695d9271c8333b6da4b01e52a375de2a329/src/CognitoUser.js#L998-L1000

armicron avatar Oct 29 '17 15:10 armicron

@nueverest @armicron Did you guys found a solution/workaround for this?

leobarcellos avatar May 08 '18 13:05 leobarcellos