add with_authorization_code function