shamblett / iot-home

A google iot-core project using MQTT for Dart
MIT License
10 stars 6 forks source link

JWT token is invalid. #2

Closed ricksondpenha closed 5 years ago

ricksondpenha commented 5 years ago

Hi, is there any way we can generate a JWT token with ES256 based signing, google iot only supports RSA256 & ES256 based keys. I've tried implementing a JWT library from Jose but have a issue there eith ES256 based signing.

https://github.com/appsup-dart/jose/issues/1#issuecomment-470838614

shamblett commented 5 years ago

Yes I fell into a bit of a trap here, when I updated from Dart 1.0 to Dart 2.0 the JWT library I was using wasn't ready, it depended on pointycastle I think which itself wasn't ready so I updated the code to use what was there for Dart 2.0. I've not looked at this for a while but the only libraries you have(unless your own) are those in pub. I need to revisit this to see where we are.

ricksondpenha commented 5 years ago

I'm using the jose plugin for now.. but even that seems to be not working for some reason, and the maintainer of the repository isn't replying for any issues for now. Can you look at the jose library and may be try it out: https://github.com/appsup-dart/jose

shamblett commented 5 years ago

Yes Ok I'll have a look at this.