aws-cdk-lib.aws_cognito.UserPoolIdentityProviderFacebookProps

interface UserPoolIdentityProviderFacebookProps

LanguageType name
.NETAmazon.CDK.AWS.Cognito.UserPoolIdentityProviderFacebookProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscognito#UserPoolIdentityProviderFacebookProps
Javasoftware.amazon.awscdk.services.cognito.UserPoolIdentityProviderFacebookProps
Pythonaws_cdk.aws_cognito.UserPoolIdentityProviderFacebookProps
TypeScript (source)aws-cdk-lib » aws_cognito » UserPoolIdentityProviderFacebookProps

Properties to initialize UserPoolFacebookIdentityProvider.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cognito as cognito } from 'aws-cdk-lib';

declare const providerAttribute: cognito.ProviderAttribute;
declare const userPool: cognito.UserPool;
const userPoolIdentityProviderFacebookProps: cognito.UserPoolIdentityProviderFacebookProps = {
  clientId: 'clientId',
  clientSecret: 'clientSecret',
  userPool: userPool,

  // the properties below are optional
  apiVersion: 'apiVersion',
  attributeMapping: {
    address: providerAttribute,
    birthdate: providerAttribute,
    custom: {
      customKey: providerAttribute,
    },
    email: providerAttribute,
    familyName: providerAttribute,
    fullname: providerAttribute,
    gender: providerAttribute,
    givenName: providerAttribute,
    lastUpdateTime: providerAttribute,
    locale: providerAttribute,
    middleName: providerAttribute,
    nickname: providerAttribute,
    phoneNumber: providerAttribute,
    preferredUsername: providerAttribute,
    profilePage: providerAttribute,
    profilePicture: providerAttribute,
    timezone: providerAttribute,
    website: providerAttribute,
  },
  scopes: ['scopes'],
};

Properties

NameTypeDescription
clientIdstringThe client id recognized by Facebook APIs.
clientSecretstringThe client secret to be accompanied with clientUd for Facebook to authenticate the client.
userPoolIUserPoolThe user pool to which this construct provides identities.
apiVersion?stringThe Facebook API version to use.
attributeMapping?AttributeMappingMapping attributes from the identity provider to standard and custom attributes of the user pool.
scopes?string[]The list of facebook permissions to obtain for getting access to the Facebook profile.

clientId

Type: string

The client id recognized by Facebook APIs.


clientSecret

Type: string

The client secret to be accompanied with clientUd for Facebook to authenticate the client.

See also: https://developers.facebook.com/docs/facebook-login/security#appsecret


userPool

Type: IUserPool

The user pool to which this construct provides identities.


apiVersion?

Type: string (optional, default: to the oldest version supported by Facebook)

The Facebook API version to use.


attributeMapping?

Type: AttributeMapping (optional, default: no attribute mapping)

Mapping attributes from the identity provider to standard and custom attributes of the user pool.


scopes?

Type: string[] (optional, default: [ public_profile ])

The list of facebook permissions to obtain for getting access to the Facebook profile.

See also: https://developers.facebook.com/docs/facebook-login/permissions