change function to validateAuthCode as I realized that I was token when it should have been auth code