josx / ra-data-feathers

A feathers rest client for react-admin
MIT License
157 stars 53 forks source link

Consolidated place to discuss the 'call authenticate on every request' related changes #98

Closed AndrewJDR closed 5 years ago

AndrewJDR commented 5 years ago

Back in 2017, authenticate() was set to be called upon every request, because not doing so caused a problem: https://github.com/josx/ra-data-feathers/issues/35

Later, this was reverted, and authenticate is no longer called on every request: https://github.com/josx/ra-data-feathers/commit/e5dc6ff6fa55ffcfce0eaace94a875138e28e883

I actually don't like the fact that authenticate was being called on every request, because it interferes with things like authentication rate-limiting. But at the same time, it'd be nice to know what changed that makes this authenticate call no longer necessary on every request (i.e. what ended up fixing the original issue?). Can someone perhaps provide an explanation of that? Ideally with a pointer or two to the commit(s) that actually ended up fixing the problem properly.

Thanks!

josx commented 5 years ago

Right now the only place where it calls authenticate is when AUTH_LOGIN type from authProvider is sent (not in every call to dataprovider types). I think the older problem was on page reload.

AndrewJDR commented 5 years ago

Understood on the older problem being on page reload. Nonetheless, do we understand what actually ended up fixing the page reload issue?

josx commented 5 years ago

I dont know, can you test it and give us some feedback?

The test case is: you are already logged in and reload the page

AndrewJDR commented 5 years ago

Works fine here. Pinging @lijoantony, original author of the issue #35 in hopes that he may know.