Servicestack PreAuthenticated Filter

I’m getting the following preAuthenticated filter error running a self hosted app.

I can’t remember getting this error in .net core 1.1, I’m currently using .net core 2.0 on the server side.

I use JWT in my app and this error normally occurs when the server is unavailable on the first client connection. When I then start the server the client will successfully connect to the server but servicestack will throw this error message. Connection works perfectly and the error does not seem to affect the app.

If someone can point me in the right direction of the cause it will be much appreciated.

The above error message is from the latest v5 of SS.

Version 1.0.44 displays the line numbers if it helps.

Please provide the steps to be able to repro this or a stand-alone example we can run.

I managed to find the problem. Servicestack does not like string.Empty() tokens.

My client app clears the token if not logging in successfully, I generally set the token to empty string. If I change this to any random string value it seems to work fine. In both instances the tokens are not valid but SS throws an error on only empty string values.

1 Like