user pool client userPoolClientSecret attribute missing

0

Hi team,

I added a user pool client to my user pool :

 const client  = myUserPool.addClient(
      "pool",
      {
        userPoolClientName: "appClient",
        generateSecret: true,
      }
    );

but I can't access the client's Secret

   const id = client.userPoolClientId;
   const secret = client.????? (userPoolClientSecret this properties is on the CDK doc but cannot find it on the client object 

how can I get userPoolClientSecret from the client?

this what I found on the CDK doc

User Pool clients can generate a client ID as well as a client secret, to support more advanced authentication workflows.

To create a client with an autogenerated client secret, pass the generateSecret: true prop:

const userPoolClient = new cognito.UserPoolClient(this, 'UserPoolClient', {
  userPool: importedPool,
  generateSecret: true,
});

// Allows you to pass the generated secret to other pieces of infrastructure
const secret = userPoolClient.userPoolClientSecret; //CAN'T find the userPoolClientSecret attribute

also can't find the attribute to specify the client type via the CDK (public client, confidential client, other) like on the IHM

Thank you.

1개 답변
0
수락된 답변

I upgraded the CDK version to the current version: 2.39.0 I can see the userPoolClientSecret property now

it was added since the version: V2.37.0

Jess
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠