@nrfcloud/create-token

API endpoint which creates an identity token to be used for authenticating the user against the API

Usage no npm install needed!

<script type="module">
  import nrfcloudCreateToken from 'https://cdn.skypack.dev/@nrfcloud/create-token';
</script>

README

Create Token Endpoint

npm dev version Build Status Test Coverage
Greenkeeper badge semantic-release Commitizen friendly Standard - JavaScript Style Guide
DeepScan Grade Known Vulnerabilities Maintainability

API endpoint which creates an identity token to be used for authenticating the user against the API.

:warning: This endpoint should only be used for testing environments

Tests

The tests are integration tests and use CloudFormation to set up the required resources. See

Set these environment variables:

AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...

Make sure that this user has the necessary permissions:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "cloudformation:*",
            "Resource": "arn:aws:cloudformation:*:*:stack/test-*"
        },
        {
            "Effect": "Allow",
            "Action": "cognito-idp:*",
            "Resource": "*"
        }
    ]
}