I need to use this lib in Ionic: https://github.com/auth0/node-jsonwebtoken It's to sign a token (yes, I need to sign a jwt in my front end)
It was working in Ionic 3! I was using the "declare var require: any;" trick from this post: Angular 4: "Cannot find name 'require'
All was perfect, good
But i am now in Ionic 4 and... Nothing! It's compile, ok, great, but I always had this error:
ERROR Error: "Uncaught (in promise): TypeError: obj is not an object or null
If a use a simple js file with the same code to sign a token (and run this file just with node), it's also work!
I only have this issue on Ionic 4. But not on previous version Ionic 3
If there are any recommendations on angular/ionic libraries to sign a token (instead of jsonwebtoken), that would be helpful.