- Newest
- Most votes
- Most comments
It sounds like you're experiencing an issue with some of the Amplify Gen2 authentication APIs in your NextJS application. The fact that the signUp API is working correctly while others are freezing suggests there might be a configuration or initialization problem.
Here are a few things to consider:
-
Ensure that you have properly configured Amplify in your application. In Amplify Gen2, you need to call
Amplify.configure(outputs)before using any Amplify APIs. This should be done in a client-side component or in a useEffect hook if you're using React. -
Check that you're importing the correct APIs from the new Amplify Gen2 packages. For example, you should be using imports like
import { signIn } from 'aws-amplify/auth'instead of the older format. -
Verify that your auth configuration in your resource file (e.g., auth.ts) is set up correctly, especially the authorizationModes.
-
If you're using custom groups (like an "admin" group), make sure your storage and other resource configurations include the necessary permissions for these groups.
-
Check for any console errors or network requests that might provide more information about why the APIs are freezing.
-
Ensure that you're handling the authentication flow correctly. After signUp, you may need to confirm the sign-up (if required) before you can use other auth APIs.
-
If you're using NextJS server-side rendering, make sure you're not calling Amplify APIs on the server side unintentionally, as they are meant to be used on the client side.
If the issue persists after checking these points, you might want to try creating a minimal reproduction of the problem and seek further assistance from the Amplify community or AWS support.
Remember, Amplify Gen2 is still relatively new, so there might be some undocumented issues or best practices that are still evolving.
Sources
Amplify gen 2, amplify-authenticator "There is already a signed in user." | AWS re:Post
Sign-up - AWS Amplify Gen 2 Documentation
Issue with amplify gen2 file upload using Storage: access denied | AWS re:Post
Relevant content
- asked 9 months ago
- asked 9 months ago

Already tried these things unfortunately.