Lokicoule / nestjs-cognito

AWS Cognito utilities module for NestJS.
https://www.npmjs.com/package/@nestjs-cognito/auth
MIT License
81 stars 7 forks source link

Support: Multiple Cognito User Pools #652

Closed pivstone closed 1 year ago

pivstone commented 1 year ago

Do you know how can I add multiple user pools?

I assume this way will not working at all, right?

imports: [
    CognitoAuthModule.register({
      jwtVerifier: {
        userPoolId: "user_pool_2_id",
        clientId: "client_2_id",
        tokenUse: "id",
      },
    }),
   CognitoAuthModule.register({
      jwtVerifier: {
        userPoolId: "user_pool_id",
        clientId: "client_id",
        tokenUse: "id",
      },
    }),
  ],
pscanlon1 commented 1 year ago

Did you find a solution to this? I have a use case where we have a user pool for external users, and I want to create another pool for server to server communication...

mikhin commented 10 months ago

@pivstone, @pscanlon1, hi! Can you please tell me how you solved this problem?

pivstone commented 10 months ago

Sorry, we don't have a solution for it base on this lib. Because we are using AppSync with cognito . So we just trust the request from AppSync and use their request context to get identity info. FYI, aws AppSync will support private VPC.

Lokicoule commented 6 months ago

Hello, @nestjs-cognito/auth package now supports multiple Cognito user pools in NestJS app with version 1.1.4.