apexad/node-aladdin-connect-garage-door

Logging in on every request

Opened this issue · 2 comments

Hi, I work for Overhead Door Corporation, which owns Genie (Aladdin Connect). Your current implementation issues a login request for every API call, which is causing a very large number of active sessions for users of HomeBridge. We follow the OAuth2.0 specification, and the access token you receive is valid for 24 hours.

As a quick fix for this, could you do the following?

  1. Cache the access token somehow and use it until it expires
  2. When it expires, logout by sending a POST request to https://app.apps.st1.gdocntl.net/api/v1/session/logout with the Authorization header set to the bearer token (e.g. "Authorization": "Bearer 12345")

At the very least, could you issue the logout request after every API request? This way we will not end up with so many orphaned user sessions.

Hi Adam, this project has been deprecated. I do not even have means to use the plugin anymore, as I no longer own a Genie garage door opener. Your suggestion makes total sense, kudos for implementing the OAUTH - but alas, I cannot help you there.

This package is deprecated, please use [https://github.com/derek-miller/homebridge-genie-aladdin-connect](https://www.npmjs.com/package/homebridge-aladdin-connect-garage-door) instead

As mentioned, this code should no longer be used by most homebridge users. Sadly, if it is, it’s likely by old users that may not update it anyway. I don’t even think this code works anymore. It was using exosite.com not gdocntl.net

I would merge a PR with any changes though if you need.