def _on_signin(self, data, auth_info, provider):
        # Create the auth ID format used by the User model
        auth_id = '%s:%s' % (provider, data['id'])
        user_model = auth.get_auth().store.user_model
        user = user_model.get_by_auth_id(auth_id)

        if not user:
            ok, user = user_model.create_user(auth_id)
            if not ok:
                logging.error('Unable to create user for auth_id %s' % auth_id)
                self.abort(500, 'Unable to create user')

        return user
dataset/ETHPy150Open loudnate/appengine-endpoints-auth-example/auth/handlers.py/AuthHandler._on_signin/original