Make getAuthenticationTokenUsingXYZ asynchronous

As a result, the local webserver now needs to synchronise that with a lock. Otherwise the do_GET function would no longer block, and wouldn't properly be able to return the correct redirect URL.

Contributes to issue CURA-8539.
This commit is contained in:
Ghostkeeper 2021-11-19 16:55:45 +01:00
parent 9b55ae6dda
commit 7091c5f3aa
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
3 changed files with 33 additions and 43 deletions

View file

@ -249,7 +249,7 @@ class AuthorizationService:
self._auth_data = AuthenticationResponse(**preferences_data)
# Also check if we can actually get the user profile information.
def callback(profile: Optional[UserProfile]):
def callback(profile: Optional["UserProfile"]):
if profile is not None:
self.onAuthStateChanged.emit(logged_in = True)
Logger.debug("Auth data was successfully loaded")