constructor()

in infrastructure/lib/constructs/user-pool-identity-provider-oidc.ts [22:43]


  constructor(scope: Construct, id: string, props: UserPoolIdentityProviderOIDCProps) {
    super(scope, id, props);

    const resource = new CfnUserPoolIdentityProvider(this, 'Resource', {
      userPoolId: props.userPool.userPoolId,
      providerName: props.providerName,
      providerType: 'OIDC',
      attributeMapping: {
        email: 'email',
      },
      providerDetails: {
        client_id: props.clientId,
        client_secret: props.clientSecret,
        attributes_request_method: 'GET',
        oidc_issuer: props.issuerUrl,
        authorize_scopes: props.scopes
      }
    });

    this.providerName = super.getResourceNameAttribute(resource.ref);

  }