python from authomatic import Authomatic from authomatic.providers import oauth2 authomatic = Authomatic() config = { 'google': { 'class_': oauth2.Google, 'consumer_key': 'your_google_consumer_key', 'consumer_secret': 'your_google_consumer_secret', 'scope': ['profile', 'email'] } } authomatic.config(config) result = authomatic.login(oauth2.Google) if result: if result.user: print(result.user.name, result.user.email) elif result.error: print(result.error)


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