define findOrCreate auth function