-
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
Custom userPoolEndpoint does not take effect in Next.js adapter and custom identityPoolEndpoint is unsupported #13650
Comments
Hello, @tonestrike and thanks for opening this issue. This is my first time seeing LocalStack (assuming you mean this, right?) and trying to understand how you've implemented it in your Next.JS app. It looks like LocalStack points to a I've marked this as a feature request that we'll review internally and with our product team. If there's further questions or updates, we'll let you know. Thanks! |
Yes, exactly! The client side amplify sdk supports an override to the endpoint. In addition, you can customize the cognito domain so even outside of the context of local development, this would be helpful. |
To clarify, given the current state of the library:
|
After digging into the source code, the endpoint resolver for resolving the custom user pool function relies on the Amplify singleton that's used on the client side. This may cause the custom endpoint to NOT be resolved within the context of In addition, I noticed this PR #13552 which should fulfill the feature request overriding the identity pool endpoint. |
Is this related to a new or existing framework?
Next.js
Is this related to a new or existing API?
Authentication
Is this related to another service?
No response
Describe the feature you'd like to request
This is my configuration:
My
userPoolEndpoint
points to LocalStack. Everything works correctly on the client side, but on the server side, Amplify is not able to parse the cookies and return the current user.If I use an AWS hosted Cognito User Pool, everything works as expected. My assumption is that
userPoolEndpoint
is not supported on the server side.This is the error:
This is my middleware:
Describe the solution you'd like
Support
userPoolEndpoint
on the server side using @aws-amplify/adapter-nextjs.Describe alternatives you've considered
Looked into work arounds and could not find one.
Additional context
No response
Is this something that you'd be interested in working on?
The text was updated successfully, but these errors were encountered: