Exception der Klasse EJOSEException mit der Meldung 'Key is too short (176bit), expected (256bit)' aufgetreten.

I get above message as soon as i try to set a secret in the sparkle server.
After checking FAQ it was stated to use a key that is longer than 32 Bit, but if i use a key longer than 32 Bit like "super_secret_0123456789_0123456789" i get the message : "Im Projekt XData_TodoListServer.exe ist eine Exception der Klasse EJOSEException mit der Meldung 'JWS signature is invalid: D75Mfupb5g7yCiEgcC63ts_jwVC7MhStFiTcny9I2mo' aufgetreten."

I checked with the delivered demo project ToDoList Server, same effect !!!

Any idea what i am doing wrong

br
Michael

Please note that you have to change the secret used to sign the JWT, and also use the same secret in the JWT middleware that checks for the signature. Have you changed both?

Hi,

i am loading the secret in the XDataServerJWTGetSecret event.
As soon as i try to connect to the xdata server, i get the invalid signature message.
I understood that i get the secret for the client with the login, but as i stated before, i can't even connect to the server ????

Thx and br
Michael

Hi,

HaHa, found the problem, and again it was the guy on the keyboard :rofl:
i missed to delete the key in the storage.... -> window.localStorage.RemoveItem(cStorageTokenName);

now i can connect , and finish my work, Thx

br
Michael

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.