Fix issue of redundant oauth rebuilding when redirects