python from authomatic import Authomatic from authomatic.providers import oauth2 CONFIG = { 'google': { 'class_': oauth2.Google, 'consumer_key': 'YOUR_CONSUMER_KEY', 'consumer_secret': 'YOUR_CONSUMER_SECRET', } } authomatic = Authomatic(CONFIG, 'your_secret_string') login_response = authomatic.google.login() result = authomatic.google.login() if result: if result.error: print(result.error.message) else: access_token = result.access_token user_info = result.user_info else: print('Authentication failed.')


上一篇:
下一篇:
切换中文