nodeSolidServer / solid-auth-client

A browser library for performing authenticated requests to Solid pods
https://solid.github.io/solid-auth-client/
MIT License
95 stars 42 forks source link

Implement stopTrackingSession method #138

Closed NoelDeMartin closed 5 years ago

NoelDeMartin commented 5 years ago

In some situations, it may be desirable to stop tracking session status. This PR implements such a feature.

However, it's important to note that the Flow linter is currently throwing an error, but I'm not sure why. The error in particular is Cannot call this.off because property off is missing in SolidAuthClient. I'm not familiar with Flow, but I don't understand why is this failing. The off method exists in the parent class EventEmitter, so it should be ok. The test I implemented is also passing, so the implementation should be correct.

RubenVerborgh commented 5 years ago

Use removeListener instead?

RubenVerborgh commented 5 years ago

Would rename to stopTrackSession for consistency.

NoelDeMartin commented 5 years ago

@RubenVerborgh Ok it seems to work with removeListener. Not sure why off wasn't working, since the trackSession method is implemented using on. Anyways, it's working now, thank you :+1:.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.05%) to 83.761% when pulling 68e7beb0e39118969ed885e2c9ed60f4be7ae088 on NoelDeMartin:patch-1 into b673efa2d83f649a5ec80777e4b515c280eaf30f on solid:master.