Angular 2.x (or later)
UUIDs
In order to generates unique IDs, the Authentication Service Team recommends to use node-uuid (https://www.npmjs.com/package/uuid) as a dependency of the Angular project.
Cryptography
The Authentication Service Team recommends to use node-jose (https://github.com/cisco/node-jose) to perform cryptographic operations with Angular > 2.x.
To do so, add the following (latest version) dependencies in your angular 2+ project:
- node
- crypto-browserify
- node-jose
"dependencies": {
(...)
"crypto-browserify": "...",
"node": "...",
"node-jose": "...",
(...)
Angular 2 strips crypto.js by default, to change this, modify the file "node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js" within your project:
// replace the content of the return value of getBrowserConfig() function
node: false
// with
node: {crypto: true, stream: true},
node-jose is then available to be used within components.
Topics in this section: