aws-cognito-angular-quickstart 正在参加 2021 年度 OSC 中国开源项目评选,请投票支持!
aws-cognito-angular-quickstart 在 2021 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!
2021 年度 OSC 中国开源项目评选 正在火热进行中,快来投票支持你喜欢的开源项目!
2021 年度 OSC 中国开源项目评选 >>> 中场回顾
aws-cognito-angular-quickstart 获得 2021 年度 OSC 中国开源项目评选「最佳人气项目」 !
授权协议 Apache-2.0 License
开发语言 JavaScript
操作系统 跨平台
软件类型 开源软件
所属分类 云计算Serverless 系统
开源组织
地区 不详
投 递 者 首席测试
适用人群 未知
收录时间 2021-12-02

软件简介

Cognito Quickstart

Creator: Vladimir Budilov

Note: This repo is deprecated. It was created before the Amplify SDK was available which performs a lot of the plumbing for you. Please use the Amplify SDK going forward. Here's an example of its use with ReactJS as well.

What does this app do?

QuickStart Angular2 Cognito App

Tech Stack

Required Tools

Frameworks

AWS Setup

Install the required tools (the installation script only runs on Linux and Mac)

Getting the code and running it locally

This uses the pre-configured AWS resources hosted by AWS

# Clone it from github
git clone --depth 1 git@github.com:awslabs/aws-cognito-angular2-quickstart.git
# Install the NPM packages
cd aws-cognito-angular2-quickstart
npm install
# Run the app in dev mode
npm start

Creating AWS Resources

This sample application can be deployed to either Elastic Beanstalk or S3. S3 will host this application as a static site while Elastic Beanstalk gives you the capability of adding backend operations to the application.

createResources.sh requires your aws cli to be configured for JSON output.

# Install the AWS resources and deploy your application to either Elastic Beanstalk or S3
cd aws
./createResources.sh

Running the above command will create the necessary AWS resources and build & deploy your code to AWS. It will prompt you to choose your deployment target (S3 or Elastic Beanstalk). Choosing 'S3' makes your deployment completely serverless, while choosing Elastic Beanstalk will create an EC2 instance that will host this NodeJS app.

Caution: You might incur AWS charges after running the setup script

After initially running the createResources.sh script, use the below commands to rebuild and redeploy

S3: Update, Build and Deploy

# Build the project and sync the output with the S3 bucket
npm run build; cd dist; aws s3 sync . s3://[BUCKET_NAME]/
# Test your deployed application
curl –I http://[BUCKET_NAME].s3-website-[REGION].amazonaws.com/

NOTE: You might want to reshuffle some of the "package.json" dependencies and move the ones that belong to devDependencies for a leaner deployment bundle. At this point of time, AWS Beanstalk requires all of the dependencies, including the devDependencies to be under the dependencies section. But if you're not using Beanstalk then you can optimize as you wish.

or

Beanstalk: Update, Build and Deploy

# Commit your changes in order to deploy it to your environment
git add .
git commit
eb deploy
# View your deployed application in a browser
eb open

Local Testing

This section contains instructions on how to test the application locally (using mocked services instead of the real AWS services).

LocalStack

To test this application using LocalStack, you can use the awslocal CLI (https://github.com/localstack/awscli-local).

pip install awscli-local

Simply parameterize the ./createResources.sh installation script with aws_cmd=awslocal:

cd aws; aws_cmd=awslocal ./createResources.sh

Once the code is deployed to the local S3 server, the application is accessible via http://localhost:4572/cognitosample-localapp/index.html (Assuming "localapp" has been chosen as resource name in the previous step)

展开阅读全文

代码

评论

点击引领话题📣
暂无内容
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
webpack-dev-server 安全漏洞
输入验证不恰当
webpack-dev-server是一款主要用于测试的开发服务器。 webpack-dev-server 3.1.6之前版本中的lib/Server.js文件存在安全漏洞,该漏洞源于程序没有检测请求包头中的Origin字段。攻击者可通过从任意来源连接ws://127.0.0.1:8080/利用该漏洞接收WebSocket服务器发送的HMR消息。
CVE-2018-14732 MPS-2018-12609
2022-08-08 18:52
Amazon Aws-sdk-js 安全漏洞
Amazon Aws-sdk-js是美国亚马逊(Amazon)公司的一个基于Javascript用于为nodejs应用提供AWS服务支持的开发包。 Amazon Aws-sdk-js before 1.0.0-rc.9 存在安全漏洞,攻击者可利用该漏洞向应用程序提交恶意的INI文件,根据上下文进一步加以利用。
CVE-2020-28472 MPS-2021-0649
2022-08-08 18:52
karma输入验证错误漏洞
跨站重定向
karma是一个简单的工具,允许您在多个 真实浏览器中执行 JavaScript 代码。karma 6.3.16之前版本存在安全漏洞,该漏洞源于缺少对返回url查询参数的验证,攻击者可利用该漏洞执行重定向攻击。
CVE-2021-23495 MPS-2021-19534
2022-08-08 18:52
jasmine-core 存在拒绝服务漏洞
拒绝服务
jasmine-core 是 JavaScript 的行为驱动开发测试框架。此软件包的受影响版本容易受到正则表达式拒绝服务 (ReDoS) 的攻击。
MPS-2022-12948
2022-08-08 18:52
@angular/core 存在跨站脚本漏洞
XSS
@angular/core 是一个包,可让您编写客户端 Web 应用程序,就好像您拥有更智能的浏览器一样。它还允许您使用 HTML 作为模板语言,并允许您扩展 HTML 的语法以清晰简洁地表达应用程序的组件。此软件包的受影响版本在启用 SSR 的情况下容易受到开发中的跨站点脚本 (XSS) 的攻击。
MPS-2022-13545
2022-08-08 18:52
karma跨站脚本漏洞
XSS
Karma是一个简单的工具。允许在多个真实的浏览器中执行 JavaScript 代码。karma存在跨站脚本漏洞,该漏洞源于NPM karma中的DOM。目前没有详细的漏洞细节提供。
CVE-2022-0437 MPS-2022-2997
2022-08-08 18:52
没有更多内容
加载失败,请刷新页面
点击加载更多
加载中
下一页
0 评论
0 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部