How to require admin confirmation of registered users with AWS Cognito?











up vote
0
down vote

favorite












I am using the Cognito Hosted UI option to register and sign-in users for my website. Currently, users who register are immediately able to sign-in using their username/password. This is an issue because this allows anyone to register and then to access restricted parts of the site. What I would like to do is require that the ADMIN manually confirm every registered user before they can login.



Is this possible to achieve?










share|improve this question


























    up vote
    0
    down vote

    favorite












    I am using the Cognito Hosted UI option to register and sign-in users for my website. Currently, users who register are immediately able to sign-in using their username/password. This is an issue because this allows anyone to register and then to access restricted parts of the site. What I would like to do is require that the ADMIN manually confirm every registered user before they can login.



    Is this possible to achieve?










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am using the Cognito Hosted UI option to register and sign-in users for my website. Currently, users who register are immediately able to sign-in using their username/password. This is an issue because this allows anyone to register and then to access restricted parts of the site. What I would like to do is require that the ADMIN manually confirm every registered user before they can login.



      Is this possible to achieve?










      share|improve this question













      I am using the Cognito Hosted UI option to register and sign-in users for my website. Currently, users who register are immediately able to sign-in using their username/password. This is an issue because this allows anyone to register and then to access restricted parts of the site. What I would like to do is require that the ADMIN manually confirm every registered user before they can login.



      Is this possible to achieve?







      amazon-web-services amazon-cognito






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 5 at 2:46









      12th

      445




      445
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          If you want to manually confirm every user that has registered using your Cognito User Pool, you could perform the following steps:



          Step 1: Ensure that E-Mail/SMS verification requirement is unchecked in the "MFA and Verifications" sidebar in your Amazon Cognito User Pool console.



          Step 2: To improve user experience, utilize a custom UI for your web/mobile application. After your users sign-up, redirect them to a different web-page which states that they would require admin verification. If you are using the Cognito default UI, the message "User Pool not configured properly for confirmation code delivery" which doesn't necessarily deliver a seamless user experience.



          Step 3: Now, your signed up users should have the "UNCOFIRMED" state in the Amazon Cognito User Pool.



          Step 4: To manually confirm the user, you can use the AdminConfirmSignUp API call[1], from your application code or from the CLI. This requires the user-pool-id and the username, and would also need Administrator credentials for it to run successfully.



          I tested this out on my end, and I was able to manually confirm all the users that had registered to my Amazon Cognito User Pool.
          The API call I tried on my end is as follows(tested via the CLI):



          aws cognito-idp admin-confirm-sign-up --user-pool-id us-east-1_XXXX --username XXXX


          After the AdminConfirmSignUp API call, your "UNCONFIRMED" users should have the "CONFIRMED" status.



          References



          [1]. https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminConfirmSignUp.html






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53147673%2fhow-to-require-admin-confirmation-of-registered-users-with-aws-cognito%23new-answer', 'question_page');
            }
            );

            Post as a guest
































            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote



            accepted










            If you want to manually confirm every user that has registered using your Cognito User Pool, you could perform the following steps:



            Step 1: Ensure that E-Mail/SMS verification requirement is unchecked in the "MFA and Verifications" sidebar in your Amazon Cognito User Pool console.



            Step 2: To improve user experience, utilize a custom UI for your web/mobile application. After your users sign-up, redirect them to a different web-page which states that they would require admin verification. If you are using the Cognito default UI, the message "User Pool not configured properly for confirmation code delivery" which doesn't necessarily deliver a seamless user experience.



            Step 3: Now, your signed up users should have the "UNCOFIRMED" state in the Amazon Cognito User Pool.



            Step 4: To manually confirm the user, you can use the AdminConfirmSignUp API call[1], from your application code or from the CLI. This requires the user-pool-id and the username, and would also need Administrator credentials for it to run successfully.



            I tested this out on my end, and I was able to manually confirm all the users that had registered to my Amazon Cognito User Pool.
            The API call I tried on my end is as follows(tested via the CLI):



            aws cognito-idp admin-confirm-sign-up --user-pool-id us-east-1_XXXX --username XXXX


            After the AdminConfirmSignUp API call, your "UNCONFIRMED" users should have the "CONFIRMED" status.



            References



            [1]. https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminConfirmSignUp.html






            share|improve this answer

























              up vote
              1
              down vote



              accepted










              If you want to manually confirm every user that has registered using your Cognito User Pool, you could perform the following steps:



              Step 1: Ensure that E-Mail/SMS verification requirement is unchecked in the "MFA and Verifications" sidebar in your Amazon Cognito User Pool console.



              Step 2: To improve user experience, utilize a custom UI for your web/mobile application. After your users sign-up, redirect them to a different web-page which states that they would require admin verification. If you are using the Cognito default UI, the message "User Pool not configured properly for confirmation code delivery" which doesn't necessarily deliver a seamless user experience.



              Step 3: Now, your signed up users should have the "UNCOFIRMED" state in the Amazon Cognito User Pool.



              Step 4: To manually confirm the user, you can use the AdminConfirmSignUp API call[1], from your application code or from the CLI. This requires the user-pool-id and the username, and would also need Administrator credentials for it to run successfully.



              I tested this out on my end, and I was able to manually confirm all the users that had registered to my Amazon Cognito User Pool.
              The API call I tried on my end is as follows(tested via the CLI):



              aws cognito-idp admin-confirm-sign-up --user-pool-id us-east-1_XXXX --username XXXX


              After the AdminConfirmSignUp API call, your "UNCONFIRMED" users should have the "CONFIRMED" status.



              References



              [1]. https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminConfirmSignUp.html






              share|improve this answer























                up vote
                1
                down vote



                accepted







                up vote
                1
                down vote



                accepted






                If you want to manually confirm every user that has registered using your Cognito User Pool, you could perform the following steps:



                Step 1: Ensure that E-Mail/SMS verification requirement is unchecked in the "MFA and Verifications" sidebar in your Amazon Cognito User Pool console.



                Step 2: To improve user experience, utilize a custom UI for your web/mobile application. After your users sign-up, redirect them to a different web-page which states that they would require admin verification. If you are using the Cognito default UI, the message "User Pool not configured properly for confirmation code delivery" which doesn't necessarily deliver a seamless user experience.



                Step 3: Now, your signed up users should have the "UNCOFIRMED" state in the Amazon Cognito User Pool.



                Step 4: To manually confirm the user, you can use the AdminConfirmSignUp API call[1], from your application code or from the CLI. This requires the user-pool-id and the username, and would also need Administrator credentials for it to run successfully.



                I tested this out on my end, and I was able to manually confirm all the users that had registered to my Amazon Cognito User Pool.
                The API call I tried on my end is as follows(tested via the CLI):



                aws cognito-idp admin-confirm-sign-up --user-pool-id us-east-1_XXXX --username XXXX


                After the AdminConfirmSignUp API call, your "UNCONFIRMED" users should have the "CONFIRMED" status.



                References



                [1]. https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminConfirmSignUp.html






                share|improve this answer












                If you want to manually confirm every user that has registered using your Cognito User Pool, you could perform the following steps:



                Step 1: Ensure that E-Mail/SMS verification requirement is unchecked in the "MFA and Verifications" sidebar in your Amazon Cognito User Pool console.



                Step 2: To improve user experience, utilize a custom UI for your web/mobile application. After your users sign-up, redirect them to a different web-page which states that they would require admin verification. If you are using the Cognito default UI, the message "User Pool not configured properly for confirmation code delivery" which doesn't necessarily deliver a seamless user experience.



                Step 3: Now, your signed up users should have the "UNCOFIRMED" state in the Amazon Cognito User Pool.



                Step 4: To manually confirm the user, you can use the AdminConfirmSignUp API call[1], from your application code or from the CLI. This requires the user-pool-id and the username, and would also need Administrator credentials for it to run successfully.



                I tested this out on my end, and I was able to manually confirm all the users that had registered to my Amazon Cognito User Pool.
                The API call I tried on my end is as follows(tested via the CLI):



                aws cognito-idp admin-confirm-sign-up --user-pool-id us-east-1_XXXX --username XXXX


                After the AdminConfirmSignUp API call, your "UNCONFIRMED" users should have the "CONFIRMED" status.



                References



                [1]. https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminConfirmSignUp.html







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 5 at 12:08









                lightyagami

                977




                977






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53147673%2fhow-to-require-admin-confirmation-of-registered-users-with-aws-cognito%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest




















































































                    這個網誌中的熱門文章

                    Tangent Lines Diagram Along Smooth Curve

                    Yusuf al-Mu'taman ibn Hud

                    Zucchini