Fix retrieving access token when multiple tokens are stored
Change-Id: If42b8b0a4e1eafa6f0958aaf9919cbbb464cebee
diff --git a/R/KorAPConnection.R b/R/KorAPConnection.R
index 8d5a366..9c5a141 100644
--- a/R/KorAPConnection.R
+++ b/R/KorAPConnection.R
@@ -129,7 +129,7 @@
warning = function(w) invokeRestart("muffleWarning"),
error = function(e) return(NULL)),
error = function(e) { })
- if (KorAPUrl %in% keyList)
+ if (KorAPUrl %in% keyList$username)
key_get(accessTokenServiceName, KorAPUrl)
else
NULL