auth function provider fixed