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

Log error on auth failure. #299

Merged
merged 2 commits into from
Sep 17, 2020
Merged

Conversation

thegoliathgeek
Copy link
Contributor

ask util generate-lwa-tokens

When generating lwa-tokens. In case of the invalid client. tokenBody.expires_in will be undefined which causes RangeError: Invalid time.

So here legit error is thrown back in case of an invalid client.

@RonWang
Copy link
Contributor

RonWang commented Sep 14, 2020

Hi @ImDhanush ,

Thanks for your interest! Could you elaborate how to reproduce? Are you trying with a not-existing clientId? Or the client is not configured correctly? It'd be great to also run npm run lint as it seems your code won't pass linter.

Thanks,
Ron

@kakhaUrigashvili
Copy link
Contributor

Hi @ImDhanush ,

Thanks for your interest! Could you elaborate how to reproduce? Are you trying with a not-existing clientId? Or the client is not configured correctly? It'd be great to also run npm run lint as it seems your code won't pass linter.

Thanks,
Ron

PR to add running checks during PRs from forks #302

@thegoliathgeek
Copy link
Contributor Author

thegoliathgeek commented Sep 15, 2020

Hi @RonWang thank you for the response.
If the client is not configured properly or if the client is not existing. In these, both cases tokenBody will not be generated.
Hence this._getExpires(tokenBody.expires_in) throws an error saying Invalid date. Hence in the above update, a proper error is thrown back.

@kakhaUrigashvili kakhaUrigashvili merged commit 798fb44 into alexa:develop Sep 17, 2020
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

Successfully merging this pull request may close these issues.

3 participants