Rewrite authenticatiion flow properly
Rewrite authenticatiion flow properly

Over the summer, I threw together some code that loosely followed the
OAuth 2.0 protocol. It has since been rewritten to better follow this.

The first notable change is that the user obtains the authorization code
within the program. Rather than having to configure a secrets.py file
prior to running the script, the step of "going to this URL and reading
the code" is now included in the execution of the script.

Next, refresh token functionality was added. This allows the user to not
have to reauthenticate every single time the script is fixed. This is
currently untested, since it hasn't been 8 hours since I issued the most
recent access token.

This follows the protocol much more closely while also making things much
clearer for the user.

tuchandra/sleep-analysis