From 86a3bafe8cd0c0b5c05a676bfb0f598b21eed10e Mon Sep 17 00:00:00 2001 From: Justin Hayes Date: Fri, 18 Aug 2023 08:34:34 -0400 Subject: [PATCH] Remove sync from auth --- oauth2.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/oauth2.py b/oauth2.py index 546fb40..15c0bfd 100644 --- a/oauth2.py +++ b/oauth2.py @@ -5,7 +5,6 @@ from datetime import datetime, timedelta from flask import Blueprint, redirect, request, render_template, session from config import CLIENT_ID, CLIENT_SECRET, REDIRECT_URI, AUTHORIZATION_URL, TOKEN_URL -from synchronizer import synchronize_contacts oauth2_blueprint = Blueprint('oauth2', __name__) @@ -108,11 +107,7 @@ def callback(): response = requests.post(TOKEN_URL, data=token_data) if response.status_code == 200: data = response.json() - save_tokens_to_file(data['access_token'], data.get('refresh_token', ''), data['expires_in']) - - # Trigger synchronization immediately after a successful authorization - synchronize_contacts() - + save_tokens_to_file(data['access_token'], data['refresh_token'], data['expires_in']) return render_template('success.html') else: handle_error(response)