Skip to content
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

Support UserPool auth for AppSync Events with App Router SSR Auth #14280

Open
2 tasks
tmokmss opened this issue Mar 9, 2025 · 2 comments
Open
2 tasks

Support UserPool auth for AppSync Events with App Router SSR Auth #14280

tmokmss opened this issue Mar 9, 2025 · 2 comments
Labels
Events Related to AppSync Events pending-maintainer-response Issue is pending a response from the Amplify team. pending-triage Issue is pending triage

Comments

@tmokmss
Copy link

tmokmss commented Mar 9, 2025

Is this related to a new or existing framework?

React

Is this related to a new or existing API?

GraphQL API

Is this related to another service?

No response

Describe the feature you'd like to request

I want to authenticate AppSync Events connection with Cognito UserPool and also use Amplify Next.js adapter to authenticate with SSR.

Currently AppSync Events only supports CSR userpool configuration.

Describe the solution you'd like

AppSync Events authentication should support credentials from Amplify Next.js adapter (SSR) userpool session.

Describe alternatives you've considered

Currently I think I can use API key instead, but it is not ideal from security perspective.

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change
@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending a response from the Amplify team. labels Mar 9, 2025
@tmokmss tmokmss changed the title Use UserPool auth for AppSync Events with App Router SSR Auth Support UserPool auth for AppSync Events with App Router SSR Auth Mar 9, 2025
@HuiSF HuiSF added the Events Related to AppSync Events label Mar 10, 2025
@HuiSF
Copy link
Member

HuiSF commented Mar 10, 2025

Hi @tmokmss thanks for opening this issue.

AppSync Events API is WebSocket based, which makes sense that establishing the WebSocket connection per user, and per client directly from the client side. In your description, you hope to authenticate the Event API with Cognito UserPool, so I presume it is a per user use case, how would this work establishing WebSocket connections from your server for arbitrary number of end users, could you give more details about your use cases?

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending a response from the Amplify team. label Mar 10, 2025
@tmokmss
Copy link
Author

tmokmss commented Mar 11, 2025

@HuiSF Thanks. Sorry for causing confusion. I'd like to connect to AppSync Events API from client side while fetching Cognito access token from server side. When using Cognito client side authentication, it is easy to connect to event api (by just setting defaultAuthMode: "userPool") . But I guess when using Cognito SSR auth (using http-only cookie), it is currently difficult to integrate with events api from client side, right?

@github-actions github-actions bot added the pending-maintainer-response Issue is pending a response from the Amplify team. label Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Events Related to AppSync Events pending-maintainer-response Issue is pending a response from the Amplify team. pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

2 participants