python
from authomatic import Authomatic
from authomatic.providers import oauth2, openid
config = {
'google': {
'class_': oauth2.Google,
'consumer_key': 'YOUR_GOOGLE_CONSUMER_KEY',
'consumer_secret': 'YOUR_GOOGLE_CONSUMER_SECRET',
'scopes': ['email'],
},
'facebook': {
'class_': oauth2.Facebook,
'consumer_key': 'YOUR_FACEBOOK_CONSUMER_KEY',
'consumer_secret': 'YOUR_FACEBOOK_CONSUMER_SECRET',
'scope': ['email'],
},
'openid': {
'class_': openid.OpenID,
}
}
authomatic = Authomatic(config=config, secret='SOME_RANDOM_SECRET')
response = authomatic.login(
authomatic.provider.name,
url='http://example.com/auth/callback')