alextoft / sureflap

Basic PHP Examples for SureFlap API (IoT cat flap)
73 stars 17 forks source link

logout.php call returns http 405 - method not allowed #19

Open glubbah opened 3 years ago

glubbah commented 3 years ago

Hi, I was investigating why the logout.php script included from login.php always returns "Token Invalid/Expired" i.e. when the returned http status is something other than 200. It doesn't seem to really do anything from what I can tell.

The http code that's returned whenever this script is called, passing in the old token, is 405 (method not allowed). I'm not sure the end-point (url /api/auth/logout), or perhaps the parameters sent for that request are valid?

(Everything else seems to work btw, thanks for putting this collection of scripts together!).