<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Danuraha Theva on Medium]]></title>
        <description><![CDATA[Stories by Danuraha Theva on Medium]]></description>
        <link>https://medium.com/@danurahatheva?source=rss-10fe277912e3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*b0XmyOsDIaSEYj5ykMiqow.jpeg</url>
            <title>Stories by Danuraha Theva on Medium</title>
            <link>https://medium.com/@danurahatheva?source=rss-10fe277912e3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 03:00:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@danurahatheva/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[User Authentication with AWS Cognito]]></title>
            <link>https://medium.com/@danurahatheva/user-authentication-with-aws-cognito-a119644a7d41?source=rss-10fe277912e3------2</link>
            <guid isPermaLink="false">https://medium.com/p/a119644a7d41</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[cognito]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Danuraha Theva]]></dc:creator>
            <pubDate>Wed, 12 Apr 2023 18:00:43 GMT</pubDate>
            <atom:updated>2023-04-12T18:27:10.002Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*mz8d_Kw6ebzhYxMEEk21IQ.png" /><figcaption>AWS Cognito</figcaption></figure><p>Secure authentication and authorization of users is a critical aspect of any web or mobile application. Amazon Web Services (AWS) provides a user authentication and authorization service called Amazon Cognito to simplify this process. In this article, we will discuss how to use AWS Cognito, including creating user pools and connecting authentication in VS Code. We will also cover the benefits and limitations of AWS Cognito.</p><h3>Introduction to AWS Cognito</h3><p>Amazon Cognito is a fully managed service that provides user sign-up, sign-in, and access control. With Cognito, you can easily add user authentication and authorization to your web and mobile applications, without the need for any backend infrastructure. AWS Cognito supports multiple identity providers, including social media, and enables you to add multi-factor authentication and custom security workflows.</p><h3>Getting Access to AWS Cognito</h3><p>To get started with AWS Cognito, you need an AWS account. If you don’t already have one, you can sign up for a free account on the AWS website using <a href="https://aws.amazon.com/console/">https://aws.amazon.com/console/</a> Once you have an account, you can access AWS Cognito from the AWS Management Console.</p><h3>Setting up AWS Cognito</h3><p>The first step in using AWS Cognito is to create a user pool. A user pool is a container for users and the settings related to user authentication and authorization. To create a user pool, follow these steps:</p><ol><li>Log in to the AWS Management Console and navigate to the Amazon Cognito dashboard.</li><li>Click on the “Manage User Pools” button.</li><li>Click on the “Create a User Pool” button.</li><li>Give your user pool a name and configure the settings related to user authentication and authorization. This includes configuring user attributes, sign-up and sign-in options, multi-factor authentication, password policies, and access control.</li></ol><blockquote><strong><em>Some example screenshots for creating a user pool:-</em></strong></blockquote><p><em>1. Select the sign-in options and click on Next</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rGMMP8KRgw46H3ukX6XcOg.png" /><figcaption>Authentication providers</figcaption></figure><p><em>2. Select the password policy that meets your needs, whether it’s the default one or a custom one based on your preferences.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9jp36yDVE4Cqq9CBHYWBVA.png" /><figcaption>Configure security requirements</figcaption></figure><p><em>3. Select the type of Multi-factor authentication</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LLFsaYnnlZUnHvyuvqVpLQ.png" /><figcaption>Multi-factor authentication</figcaption></figure><p><em>4. Select the User Account Recovery methods that you need. Then click next.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dg4_wNZoUEluTtyRwj5c4A.png" /><figcaption>User account recovery</figcaption></figure><p><em>5. Then select the options that meet your needs.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7xLN5vjYMJMYlgUmeXc-hw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*bNwJVpXJP5mPQIx4sZzOGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ec8K37s7XqZR9qGkadKHAg.png" /></figure><p><em>6. You can also select the additional required attributes.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*awy68mTUDoZrhXmmfCQmHg.png" /><figcaption>Required attributes</figcaption></figure><p><em>7. You can also add custom attributes. Then click next.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xujRYc-oat-6reNfwvgihw.png" /></figure><p><em>8. Select how your user pool sends email messages to users.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*pYETxN5NeSNWOo6lboWurw.png" /></figure><p><em>9. Create a new IAM role. Then click next.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w1yY0QN3oy_ijs6-EeFYUQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fM4F4mZa4TAUeT3zJSISMg.png" /></figure><p><em>10. Provide a name for your user pool.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*SHGzLTkSKK9kmJJDk3oG6A.png" /></figure><p><em>11. Select the App type and Provide a name for your app client.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*6vNI1f7eFTTOjEBfpZoGMw.png" /></figure><p><em>12. You can also customize your app client settings. Then click next.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*duJhE-4fn6agCfIT92qQtA.png" /></figure><p><em>13. After that Review your selections and when satisfied, choose Create to confirm.</em></p><ol><li>Click on the “Create pool” button to create your user pool.</li><li>Once your user pool is created, you can add users to it. To add users, navigate to the “Users and groups” section of your user pool and click the “Create user” button. You can then specify the user attributes and password for each user.</li><li>Finally, configure your application to use AWS Cognito for user authentication and authorization. This involves integrating the AWS SDK for JavaScript or another SDK into your application and calling the appropriate APIs to authenticate and authorize users.</li></ol><h3>Connecting Authentication in VS Code with AWS Cognito</h3><p>Now that you have created a user pool, you can connect authentication in VS Code with AWS Cognito. To do this, you must install the AWS SDK for JavaScript and configure the SDK with your AWS credentials. You can then use the SDK to interact with your user pool and authenticate users in your application.</p><p>Here is a basic example of how to authenticate a user in your application using AWS Cognito:</p><blockquote>The usage examples below use the unqualified names for types in the Amazon Cognito Identity SDK for JavaScript. Remember to import or qualify access to any of these types:</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*r67rBPFDsf7rt-cE3XAo3Q.png" /></figure><blockquote>Registering a user with the application. One needs to create a CognitoUserPool object by providing a UserPoolId and a ClientId and signing up by using a username, password, attribute list, and validation data.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*nxzhin649Wn22nkQzFuKkw.png" /></figure><h3>Benefits of AWS Cognito</h3><p>There are several benefits to using AWS Cognito for user authentication and authorization:</p><ol><li>Security: AWS Cognito provides secure and scalable authentication and authorization of users without any backend infrastructure.</li><li>Customization: With AWS Cognito, you can customize user authentication and authorization workflows to meet the specific needs of your application.</li><li>Multi-factor authentication: AWS Cognito supports multi-factor authentication to add a layer of security to user authentication.</li><li>Easy integration: AWS Cognito can be easily integrated with other AWS services, such as AWS Lambda, Amazon S3, Amazon API Gateway, and AWS AppSync.</li><li>Scalability: AWS Cognito is a fully managed service, which means it can quickly scale to handle millions of users and authenticate them quickly and securely.</li></ol><h3>Limitations of AWS Cognito</h3><p>While AWS Cognito provides a comprehensive set of features for user authentication and authorization, there are some limitations to consider:</p><ol><li>Vendor lock-in: AWS Cognito is a proprietary service of Amazon, which means that if you use it, you may be locked into the AWS ecosystem.</li><li>Limited customizability: While AWS Cognito provides some degree of customization for user authentication and authorization workflows, it may not be enough for some applications with specific needs.</li><li>Cost: AWS Cognito can be costly for large-scale applications with millions of users, as you are charged based on the number of monthly active users.</li></ol><h3>Conclusion</h3><p>In conclusion, AWS Cognito is a powerful tool for user authentication and authorization in web and mobile applications. It provides a secure and scalable way to add user sign-up, sign-in, and access control to your applications, without the need for any backend infrastructure. While AWS Cognito has some limitations, it offers many benefits that make it an excellent choice for many applications. With its easy integration with other AWS services, you can build robust and secure applications quickly and efficiently.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a119644a7d41" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>