@cherrypy.expose
    def index(self, state, code=None, error=None):
        error = None
        if code:
            try:
                self.oauth.fetch_access_token(code, self.redirect_uri)
            except MissingTokenError:
                error = self._fmt_failure(
                    'Missing access token parameter.</br>Please check that '
                    'you are using the correct client_secret')
            except MismatchingStateError:
                error = self._fmt_failure('CSRF Warning! Mismatching state')
        else:
            error = self._fmt_failure('Unknown error while authenticating')
        # Use a thread to shutdown cherrypy so we can return HTML first
        self._shutdown_cherrypy()
        return error if error else self.success_html
Require a Node.js package.
dataset/ETHPy150Open orcasgit/python-fitbit/gather_keys_oauth2.py/OAuth2Server.index--crossover with--dataset/ETHPy150Open ronnix/fabtools/fabtools/require/nodejs.py/package