Currently in our Authentication and EnhancedAuthentication, we save credential object as serialized string values. Then, as we read the serialized string from Storage, we parse the string into a Credential object.
However, in AnonymousStorageCredentialsProvider, we overwrite the local member variable credential with the serialized string instead of the parsed object. As a result, any situation that requires reading of the credential from storage leads to: TypeError: this.credentials.expiration.getTime is not a function.
This PR removes the unnecessary step to overwrite the local member this.credential with the serialized string.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Details
Currently in our Authentication and EnhancedAuthentication, we save credential object as serialized string values. Then, as we read the serialized string from Storage, we parse the string into a Credential object.
However, in
AnonymousStorageCredentialsProvider
, we overwrite the local member variablecredential
with the serialized string instead of the parsed object. As a result, any situation that requires reading of the credential from storage leads to:TypeError: this.credentials.expiration.getTime is not a function
.This PR removes the unnecessary step to overwrite the local member
this.credential
with the serialized string.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.