This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| yarn add react-native-view-shot | |
| yarn add react-native-share | |
| yarn add react-native-fs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| npm i react-native-view-shot | |
| npm i add react-native-share | |
| npm i add react-native-fs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var x = y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { aws_cognito as cognito } from "aws-cdk-lib"; | |
| cognitoUserPool.addTrigger(cognito.UserPoolOperation.PRE_SIGN_UP, preSignupLambda) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { aws_lambda as lambda, Duration } from "aws-cdk-lib"; | |
| const preSignupLambda = new lambda.Function(this, `MyPreSignupLambda`, { | |
| functionName: `MyPreSignupLambda`, | |
| runtime: lambda.Runtime.NODEJS_14_X, | |
| handler: "index.handler", | |
| timeout: Duration.seconds(30), | |
| code: lambda.Code.fromAsset("lambda/preSignupHandler/"), | |
| environment: {}, | |
| initialPolicy: [cognitoPolicyStatement], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| aws_iam as iam | |
| } from 'aws-cdk-lib'; | |
| var cognitoPolicyStatement = new iam.PolicyStatement(); | |
| cognitoPolicyStatement.addActions("cognito-idp:*"); | |
| cognitoPolicyStatement.addResources("*"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const AWS = require("aws-sdk"); | |
| exports.handler = async (event) => { | |
| try { | |
| const { | |
| triggerSource, | |
| userPoolId, | |
| userName, | |
| request: { | |
| // You won't have given_name and family_name attributes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Amplify } from 'aws-amplify'; | |
| import { Authenticator } from '@aws-amplify/ui-react'; | |
| import '@aws-amplify/ui-react/styles.css'; | |
| Authorization.configure({ | |
| Auth: { | |
| region: "<USER_POOL_REGION>", | |
| userPoolId: "<USER_POOL_ID>", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| npm i @aws-amplify/ui-react aws-amplify |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cdk deploy |