def setInitialUrl(self): """Set the url to go to when the dialog is loaded. Clear the cookies before setting the initial url.This is because once a user completes the sign-in flow, a cookie is stored within QWebview and are not cleared until the plugin is reloaded. Clearing the cookies before showing the sign-in box. """ manager = self.webView.page().networkAccessManager() cookieJar = QNetworkCookieJar() manager.setCookieJar(cookieJar) qurl = QUrl() qurl.setEncodedUrl(oauth2_utils.buildAuthenticationUri()) self.webView.setUrl(qurl)