Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad Requests / Config when testing multiple accounts and aws-sdk #23

Open
aheld opened this issue Mar 8, 2017 · 0 comments
Open

Bad Requests / Config when testing multiple accounts and aws-sdk #23

aheld opened this issue Mar 8, 2017 · 0 comments

Comments

@aheld
Copy link

aheld commented Mar 8, 2017

I'm using this along with the aws-sdk and notice some errors related to the way aws-sdk uses localstorage.

using code like

let credentials = new AWS.CognitoIdentityCredentials({
    IdentityPoolId: Config.IdentityPoolId,
    Logins: {
      ['cognito-idp.' + Config.Region + '.amazonaws.com/' + Config.UserPoolId]: 
               that.$store.state.cognito.user.tokens.IdToken
    }
  })
  AWS.config = new AWS.Config({
     credentials: credentials, region: 'us-east-1'
  })
  let s3 = new AWS.S3()

when I login as a new user the global AWS config sometimes picks up the previous users ID with the current users IdToken.

Easily solved by calling localStorage.clear() before logging in with a different ID.

This may not be a concern of this library, but I wanted to make a note in case others experienced the issue. It only comes up in testing when we rapidly test multiple accounts using automation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant