Open jgabriel98 opened 1 week ago
I've also tried to configure right before calling signInWithRedirect
just to be sure:
Amplify.configure({
Auth: {
identityPoolId: process.env.REACT_APP_AWS_COGNITO_IDENT_POOL,
region: process.env.REACT_APP_AWS_PROJECT_REGION,
userPoolWebClientId: process.env.REACT_APP_AWS_WEB_CLIENT,
mandatorySignIn: true,
Cognito: {
userPoolId: process.env.REACT_APP_AWS_USER_POOL_ID,
userPoolClientId: process.env.REACT_APP_AWS_WEB_CLIENT,
identityPoolId: process.env.REACT_APP_AWS_COGNITO_IDENT_POOL,
signUpVerificationMethod: 'code',
loginWith: {
oauth: {
domain: process.env.REACT_APP_AWS_COGNITO_DOMAINANME,
scopes: ['phone', 'email', 'openid', 'profile', 'aws.cognito.signin.user.admin'],
redirectSignIn: [process.env.REACT_APP_AWS_REDIRECT_SIGN_IN_BEYOND],
redirectSignOut: [process.env.REACT_APP_AWS_REDIRECT_SIGN_OUT_BEYOND],
responseType: 'code',
}
},
},
},
})
await signInWithRedirect({ provider, customState })
still got same error.
I also had this issue and after much debugging, it turned out to be an issue in my tsconfig.json. It didnt seem to like:
"module": "commonjs"
Changing it to:
"module": "es2020"
fixed the issue
I also had this issue and after much debugging, it turned out to be an issue in my tsconfig.json. It didnt seem to like:
"module": "commonjs"
Changing it to:
"module": "es2020"
fixed the issue
Changed my jsconfig.json (i don't use ts) to:
{
"compilerOptions": { "baseUrl": "./src", "jsx": "react", "module": "ES2020" },
"include": ["./src"],
"exclude": ["node_modules", "**/node_modules/*", "build"],
"typeAcquisition": { "include": ["jest"] }
}
No effect.
@jgabriel98, it looks like your Amplify.configure()
may need a slight tweak. Can you see if removing some of the value just after Auth
in it (like below) helps resolve the issue?
Amplify.configure({
Auth: {
Cognito: {
userPoolId: process.env.REACT_APP_AWS_USER_POOL_ID,
userPoolClientId: process.env.REACT_APP_AWS_WEB_CLIENT,
identityPoolId: process.env.REACT_APP_AWS_COGNITO_IDENT_POOL,
signUpVerificationMethod: 'code',
loginWith: {
oauth: {
domain: process.env.REACT_APP_AWS_COGNITO_DOMAINANME,
scopes: ['phone', 'email', 'openid', 'profile', 'aws.cognito.signin.user.admin'],
redirectSignIn: [process.env.REACT_APP_AWS_REDIRECT_SIGN_IN_BEYOND],
redirectSignOut: [process.env.REACT_APP_AWS_REDIRECT_SIGN_OUT_BEYOND],
responseType: 'code'
}
},
},
},
})
identityPoolId
Sure! @cwomack done, no changes/same error 😞 .
FYI the resulting return value of Amplify.getConfig()
after you suggestion was:
{
"Auth": {
"Cognito": {
"userPoolId": "<REMOVED_FOR_SECURITY_REASONS>",
"userPoolClientId": "<REMOVED_FOR_SECURITY_REASONS>",
"identityPoolId": "us-east-1:<REMOVED_FOR_SECURITY_REASONS>",
"signUpVerificationMethod": "code",
"loginWith": {
"oauth": {
"domain": "auth.one.loggi.com",
"scopes": [
"phone",
"email",
"openid",
"profile",
"aws.cognito.signin.user.admin"
],
"redirectSignIn": [
"https://beyond.loggi.com/"
],
"redirectSignOut": [
"https://beyond.loggi.com/"
],
"responseType": "code"
}
}
}
}
}
same issue after upgrading from v5 to v6..
[AuthUserPoolException: Auth UserPool not configured.]
Doesn't work even with the AWS generated amplifyconfiguration.json file either.
***interestingly, this is only an Expo 50 issue. Got the proper config and working v6 in Expo 49.
@jgabriel98 Did you find a solution?
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
None
Environment information
Describe the bug
Migrating from amplify v3 to v6, when calling
signInWithRedirect()
i get the errorAuthUserPoolException: Auth UserPool not configured
.Note: i called
Amplify.getConfig()
right beforesignInWithRedirect()
just to be sure: and it returned normally (console.log output):old (amplify v3)
Amplify.configure()
call:new (amplify v6)
Amplify.configure()
call:more notes:
'aws-amplify'
not'@aws-amplify'
.Expected behavior
Amplify.configure to work
Reproduction steps
Amplify.configure()
at project rootsignInWithRedirect()
at a child component.Code Snippet
No response
Log output
Error Stack trace
``` Uncaught (in promise) AuthUserPoolException: Auth UserPool not configured. at https://beyond.loggi.com/static/js/0.chunk.js:749809:13 at assertTokenProviderConfig (https://beyond.loggi.com/static/js/0.chunk.js:751902:67) at _callee2$ (https://beyond.loggi.com/static/js/0.chunk.js:704125:51) at tryCatch (https://beyond.loggi.com/static/js/0.chunk.js:655040:17) at Generator.invoke [as _invoke] (https://beyond.loggi.com/static/js/0.chunk.js:655260:22) at prototype.aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response