class UserPoolIdentityProviderFacebook (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Cognito.UserPoolIdentityProviderFacebook |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awscognito#UserPoolIdentityProviderFacebook |
![]() | software.amazon.awscdk.services.cognito.UserPoolIdentityProviderFacebook |
![]() | aws_cdk.aws_cognito.UserPoolIdentityProviderFacebook |
![]() | aws-cdk-lib » aws_cognito » UserPoolIdentityProviderFacebook |
Implements
IConstruct
, IDependable
, IResource
, IUser
Represents an identity provider that integrates with Facebook Login.
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 userPoolIdentityProviderFacebook = new cognito.UserPoolIdentityProviderFacebook(this, 'MyUserPoolIdentityProviderFacebook', {
clientId: 'clientId',
clientSecret: 'clientSecret',
userPool: userPool,
// the properties below are optional
apiVersion: 'apiVersion',
attributeMapping: {
address: providerAttribute,
birthdate: providerAttribute,
custom: {
customKey: providerAttribute,
},
email: providerAttribute,
emailVerified: 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'],
});
Initializer
new UserPoolIdentityProviderFacebook(scope: Construct, id: string, props: UserPoolIdentityProviderFacebookProps)
Parameters
- scope
Construct
- id
string
- props
User
Pool Identity Provider Facebook Props
Construct Props
Name | Type | Description |
---|---|---|
client | string | The client id recognized by Facebook APIs. |
client | string | The client secret to be accompanied with clientId for Facebook to authenticate the client. |
user | IUser | The user pool to which this construct provides identities. |
api | string | The Facebook API version to use. |
attribute | Attribute | Mapping 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 clientId for Facebook to authenticate the client.
See also: https://developers.facebook.com/docs/facebook-login/security#appsecret
userPool
Type:
IUser
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:
Attribute
(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
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
node | Node | The tree node. |
provider | string | The primary identifier of this identity provider. |
stack | Stack | The stack in which this resource is defined. |
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
node
Type:
Node
The tree node.
providerName
Type:
string
The primary identifier of this identity provider.
stack
Type:
Stack
The stack in which this resource is defined.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
to | Returns a string representation of this construct. |
protected configure |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
protected configureAttributeMapping()
protected configureAttributeMapping(): any
Returns
any