Run yarn install
- Create a new folder called
keys
- Generate private / public key pair
ssh-keygen -t rsa -b 4096 -m PEM -f keys/<YOUR_FILENAME>.key
# Don't add passphrase
openssl rsa -in keys/<YOUR_FIELNAME>.key -pubout -outform PEM -out keys/<YOUR_FILENAME>.key.pub
cat keys/<YOUR_FILENAME>.key.pub
- Save the private key file in
keys
with the name<environment-region>.key
, e.g.prod-us.key
or symbolic link to it.
- Copy
conf.js.tmpl
toconf.js
- Edit
conf.js
and provide the vars IN CAPS conf.js
and/keys
are in.gitignore
they should NOT BE checked in
- Run
yarn generate:prod-us
, and a token will be generated within a link to Canvas Launcher for prod - Open that link in a browser to test authentication and initial launch
- Once Canvas is working proceed to Mobile App Development
To run this in server mode
- Run
yarn start
- This starts a server at http://localhost:8000
- In another window do the following:
curl -s http://localhost:8000/url
curl -s http://localhsot:8000/tokenInfo | jq
- Token expiration MUST be 30 seconds OR LESS
- Token expirations that are longer are automatically rejected.
- The resultant url can be used in a browser to quickly test.
sub
(subject) is a unique ID for a patient, if you re-use the same uuid then you will get a token for that patient.- Ergo, reuse
sub
if it is the same user/patient on your app. - Use a random UUID for
sub
if you do not want to expose the UUID externally. The random UUID can still be associated with this triage diagnostic session and stored as part of the partners patient EHR. (Or the whole session ID can be stored as well.)
THIS REPO IS PROVIDED AS-IS. ANY PRODUCTION DEPLOYMENT DERIVED FROM THIS REPO MUST TAKE CAREFUL PRECAUTIONS TO SAFELY TRANSFER SENSITIVE DATA SECURELY. THIS REPO IS NOT INTENDED TO TRANSFER SENSITIVE DATA - AS IS. THIS REPO IS INTENDED FOR DEMONSTRATIVE USE ONLY.