-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
SignIn call gave error - AuthUserPoolException: Auth UserPool not configured. #14042
Comments
Hi @Sneha-Syngenta thanks for raising the issue,
|
Thank you for your response. I did verified this already, config are getting called with proper values whatever we have defined in amplify.config. it returns following object:
But somehow it is giving above error. |
Did you get a chance to validate what did |
@Sneha-Syngenta, wanted to ping you again to see if you're still blocked here or if you had a chance to validate what |
Hi, Thanks for your reply. I already shared in the previous msg that we did verified this config are getting called with proper values whatever we have defined in amplify.config. it returns following object:
But somehow it is giving above error. |
@Sneha-Syngenta, can you share your
|
Hey @cwomack , I'm experiencing the same issue. I made sure to print out the config before my cognito-related function ran (sign in/out, etc.), and it indeed is printing out correctly. I also followed the instructions you gave above, but when my code calls the signIn API, I get the same error: "Auth user pool not configured." I should also add that, for my team, we utilize Amplify for two of our microservices, and just last week both were working fine with no changes being made to the config, but now both services error out with "Auth user pool not configured." |
@cwomack i did followed same step you mentioned in thread but somehow no luck. issue still persist with same error "Auth UserPool not configured." |
UPDATE: To anyone wondering, I figured out what was wrong with my implementation. The signIn API call was put into a function that was marked to "use server" (I'm using nextjs 14), which was being used within a server action, but the issue with this is that the config appears as an empty object, and that likely because the Amplify config is on the client side: "use client";
import {Amplify, type ResourcesConfig} from "aws-amplify";
export const authConfig: ResourcesConfig["Auth"] = {
Cognito: {
userPoolId: String(process.env.NEXT_PUBLIC_USER_POOL_ID),
userPoolClientId: String(process.env.NEXT_PUBLIC_USER_POOL_CLIENT_ID),
},
};
Amplify.configure(
{
Auth: authConfig,
},
{
ssr: true // use cookies for state storage over the default, local storage
}
);
export default function ConfigureAmplifyClientSide(){
return null;
} Where as my signIn API call happens on the server (this executes first), and so, the fix is to remove the "use server" statement from the function call (or from the top of your file; if your Cognito actions are all in one file). Hope that helps. If my understanding of the way Amplify works with respect to client/server is wrong, please correct me, thanks! |
There might be multiple versions of |
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication, REST API, GraphQL API
Amplify Version
v6
Amplify Categories
auth, function
Backend
None
Environment information
Amplify configuration is as follows:
However, I am receiving the error: AuthUserPoolException: Auth UserPool not configured.
aws amplify signIn code:
I tried printing configuration, the configuration are getting called.
it returns following object:
Describe the bug
At the time of login getting following error.
aws-amplify SignIn call gave error - AuthUserPoolException: Auth UserPool not configured.
Expected behavior
It should successfully do the login.
Reproduction steps
install: "aws-amplify": "^6.6.7",
Code Snippet:
Code Snippet
// Put your code below this line.
Log output
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
The text was updated successfully, but these errors were encountered: