Do you want to request a feature or report a bug?
bug
What is the current behaviour?
I have the following code:
// index.ts
import { setupAuth } from './core/service';
setupAuth();
...
// core/service.ts
import { AWSAmplifyAuthOptions, setupAwsAmplifyAuth } from '../libs/auth';
import { config } from './config';
const awsAmplifyConfig: AWSAmplifyAuthOptions = {
Auth: {
identityPoolId: config.AWS_IDENTITY_POOL_ID,
region: config.AWS_REGION,
userPoolId: config.AWS_USER_POOL_ID,
userPoolWebClientId: config.AWS_USER_POOL_WEB_CLIENT_ID
}
};
export const setupAuth = () => {
setupAwsAmplifyAuth(awsAmplifyConfig);
};
md5-6ecc85dc35c04be43f60ab8f03212799
```js
// login.ts
import Auth from '@aws-amplify/Auth';
export const signIn = () => {
if (!Auth || typeof Auth.signIn !== 'function') {
throw new Error('No Auth module found, please ensure @aws-amplify/auth is imported');
} else {
console.log('Auth-signIn', Auth);
}
Auth.signIn()...
}
The first issue is that Auth
has the correct data inside the object
and it never throws the error No Auth module found...
, but every time I am trying to SignIn
the response is User pool client XXXX does not exist.
What is the expected behaviour?
Not throw the error.
Which versions of Amplify, and which browser / OS are affected by this issue? Did this work in previous versions?
1.0.4
The user pool was recreated due to an update in the CloudFormation stack. This meant the user pool IDs had changed which is why I was unable to communicate with cognito vis Amplify.
How do you solve it? Thanks
Most helpful comment
How do you solve it? Thanks