Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Angularjs Socketio + JWT Token; connecting but not emitting after logout

$
0
0

@MSC29 wrote:

Hi guys,

I'm using socketio with a jwt token for authentication.

It works very well most of the time; connecting, emitting/receiving events etc; except when I logout + close the app/ionic browser window.

I get the token from an http call and store it to the localStorage.

After I logout and close the app/browser, I restart the app/browser, log in, get a token, store it to localStorage; but then, the socket is connecting but not emitting events unless I refresh the page.

The same problem happens when I use promises as explained here.

Anyone came accross that before?

So if the user never logs out he's fine... but otherwise he'll never be able to

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>