Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding users when Cognito set to: Only allow administrators to create users #37

Open
TonyP1961 opened this issue Feb 5, 2020 · 2 comments

Comments

@TonyP1961
Copy link

Hi,
When Cognito is set to 'Only allow administrators to create users', and running the registerUser.php script I get this error:
PHP Fatal error: Uncaught exception 'Aws\\CognitoIdentityProvider\\Exception\\CognitoIdentityProviderException' with message 'Error executing "SignUp" on "https://cognito-idp.eu-west-2.amazonaws.com"; AWS HTTP error: Client error: POST https://cognito-idp.eu-west-2.amazonaws.com` resulted in a 400 Bad Request response:\n{"__type":"NotAuthorizedException","message":"SignUp is not permitted for this user pool"}\n NotAuthorizedException (client): SignUp is not permitted for this user pool - {"__type":"NotAuthorizedException","message":"SignUp is not permitted for this user pool"}'\n\nGuzzleHttp\Exception\ClientException: Client error: POST https://cognito-idp.eu-west-2.amazonaws.com resulted in a 400 Bad Request response:\n{"__type":"NotAuthorizedException","message":"SignUp is not permitted for this user pool"}\n in /home/ubuntu/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113\nStack trace:\n#0 /home/ubuntu/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHtt in /home/ubuntu/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php on line 192`

When running with Allow users to sign up it works fine and user is added.

I don't want users to signup themselves, only myself, but the process is automated using this script to complete the process, as they have to be verified first as a client already in out system.

Thanks for any help on this.

@pmill
Copy link
Owner

pmill commented Feb 21, 2020

Hi @TonyP1961, I'd be happy to accept a PR if you've managed to find a fix.

@abhi36
Copy link

abhi36 commented Feb 21, 2020

This is a feature request and should be closed soon with recent merges

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants