question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expected params.AuthParameters['USERNAME'] to be a string

See original GitHub issue

My AWS user pool is setup to use only phone numbers as the username. When I try to make an API call with this test cli I get the following message:

Authenticating with User Pool Expected params.AuthParameters[‘USERNAME’] to be a string

I tried wrapping the username parameter in both single and double quotes. Same result.

npx aws-api-gateway-cli-test \
--username='15555555555' \
--password='Passw0rd!' \
...

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sjl2commented, Feb 12, 2019

Looks like yargs will take the input here for username, but the problem for phone numbers is that they’re probably getting converted to numbers.

Every argument that looks like a number (!isNaN(Number(arg))) is converted to one. This way you can just net.createConnection(argv.port) and you can add numbers out of argv with + without having that mean concatenation, which is super frustrating. Reference

PoC

node
> !isNaN(Number('+013333333333'))
true

Looks like the username argument will need to be coerced to a string.

0reactions
jayaircommented, Aug 4, 2019

Fixed this in 1.3.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - S3 file upload 'Expected params.Key to be a string'
I am trying to upload an image to S3 with my NodeJS backend, but I can't get it to work. This is the...
Read more >
AdminCreateUser - Amazon Cognito User Pools
Creates a new user in the specified user pool. ... When you use the ClientMetadata parameter, remember that Amazon Cognito won't ... Type:...
Read more >
OAuth Parameters - Internet Assigned Numbers Authority
OAuth Access Token Types; OAuth Authorization Endpoint Response Types ... Name, Parameter Usage Location, Change Controller, Reference ...
Read more >
Azure API Management transformation policies | Microsoft Learn
The set-query-parameter policy adds, replaces value of, or deletes request query string parameter. Can be used to pass query parameters expected ...
Read more >
HTTP API Reference - Pusher Channels Docs
All requests MUST be authenticated, as described in the Generating authentication signatures section. Parameters MUST be submitted in the query string for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found