doc auth function