ADmad/CakePHP-HybridAuth — pull request #9 by lfk (2014-11-29 21:37:34+00:00)
Title: Handle expired or revoked tokens by calling $adapter->logout()

Hi there,

I bumped into an issue where, if the user revoked the application's access, I'd get stuck in a loop on the login page since HybridAuth attempted to fetch the profile with the old credentials over and over again.

This commit addresses the issue with a try/catch that, if an exception is encountered, calls `$adapter->logout();`. The actual exception is then passed upstream. I didn't check for any particular error codes, so feel free to extend further.

Cheers!