Create function that works with omni-auth.