Is there a way to force Ktor to Auth plugin to cal...
# ktor
j
Is there a way to force Ktor to Auth plugin to call
loadTokens {}
again? I’m running into a weird issue after failed login, then successfully login attempt my HttpClient doesn’t load the bearer tokens.
x
try
Copy code
client.pluginOrNull(Auth)
    ?.providers
    ?.filterIsInstance<BearerAuthProvider>()
    ?.firstOrNull()
    ?.clearToken()
h
client.authProvider<BearerAuthProvider>()?.clearToken()
j
Can confirm this works:
client.authProvider<BearerAuthProvider>()?.clearToken()