mrellipse / toucan

Boilerplate template using Vue.js, TypeScript and .NET Core 2.1, based on SOLID design principles
MIT License
212 stars 36 forks source link

Add SignalR to sync #6

Closed hmuhdkamran closed 6 years ago

hmuhdkamran commented 7 years ago

Add SignalR to sync both side, when the token is expired on server side vice versa, the system should logout. If the client is working on a page and the token on server side is expired the client should intimate the server that user is currently working and should not be logged out.

mrellipse commented 6 years ago

Hi there, sorry about the delay in replying. Work has been crazy past few days!

If you view token-helper.ts#L61 you can see that client code already has access to the date & time when the token will expire

I am thinking that a much simpler way would be if you created a Vue component, that binds to the user object in the Vuex store, and does countdown checks 😄

I don't want to add SignalR as the Toucan template is already opinionated enough. I deliberately left out a lot of things such as logging, lodash - people want to do these in different ways.