2020-06-18から1日間の記事一覧

AWS API GatewayをCognito ユーザPool認証ユーザのみアクセス可能にする

API GatewayをCognitoで認証したユーザのみアクセス可能にします。 参考: REST API を Amazon Cognito ユーザープールと統合する - Amazon API Gateway API GatewayのSwagger定義 API GatewayにCognitoのjwtをAPIキーとして送信し、検証する。という考え方で…

AWS Cognito ユーザPoolからログイン処理を行う

昨日はsignup処理を記述したので、今回はsignin処理を記述します。 AWS CognitoユーザPoolの作成とSignupの実装 - 追憶行 Signin処理の実装 import { CognitoUserPool, CognitoUserAttribute, AuthenticationDetails, CognitoUser } from 'amazon-cognito-id…

AWS CognitoユーザPoolの作成とSignupの実装

ユーザPoolの作成 CloudFormationのtemplate.yamlとして記述しました。 cognito-template.yaml Resources: UserPool: Type: 'AWS::Cognito::UserPool' Properties: Schema: - Name: 'email' StringAttributeConstraints: MinLength: '0' MaxLength: '2048' R…