'Set the current session with OAuth user secrets'

def set_oauth_session(self, provider, oauth_response):

    token_key = self.appbuilder.sm.get_oauth_token_key_name(provider)
    token_secret = self.appbuilder.sm.get_oauth_token_secret_name(provider)
    session['oauth'] = (oauth_response[token_key], oauth_response.get(token_secret, ''))
    session['oauth_provider'] = provider
