Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def _on_auth(self, user):
- if not user:
- self.abort(403)
- return
- auth_id = 'google|%s' % user['email']
- store = MultiAuthStore(self)
- store.login_with_auth_id(auth_id, remember=True)
- # check if this user is registered
- # with us or not, if not then we will create
- # an entry for him
- if store.user is None:
- user = self.auth.create_user(username=user['email'],auth_id=auth_id)
- return self._on_auth_redirect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement