Jwt_secret cannot be set/recognized/whatever

I have tried to create and set jwt_secret multiple times in last few days. Every time I try I get:

time="2018-12-08T22:32:33Z" level=info msg="finished unary call with code Unauthenticated" error="rpc error: code = Unauthenticated desc = authentication failed: jwt parse error: token contains an invalid number of segments" grpc.code=Unauthenticated grpc.method=List grpc.service=api.ApplicationService grpc.start_time="2018-12-08T22:32:33Z" grpc.time_ms=0.089 peer.address="127.0.0.1:49488" span.kind=server system=grpc

This is from lora-app-server docker container log, on client I get:

{
  "error": "authentication failed: jwt parse error: token contains an invalid number of segments",
  "message": "authentication failed: jwt parse error: token contains an invalid number of segments",
  "code": 16,
  "details": []
}

I have created a key using

openssl rand -base64 32 

And put it into

~/loraserver-docker/configuration/lora-app-server/lora-app-server.toml

like this:

...
[application_server.external_api]
bind="0.0.0.0:8080"
jwt_secret="XyytqIrasc0hPnfRbb1UJZxZPBRuLteyS7gyOkFTrlM="

After I restart my docker container, and try a command from swagger’s “Try it out!”, invariably it gives above result.

Any ideas?

dd

There is already an other topic covering this error: https://forum.loraserver.io/t/authentication-failed-token-contains-an-invalid-number-of-segments/59.