Alina Dolgikh [JB]
Stefan Oltmann
10/10/2024, 4:03 PMPHondogo
10/10/2024, 6:36 PMRenan Kummer
10/10/2024, 8:35 PMPhilip Segerfast
10/10/2024, 9:28 PMFrank Bouwens
10/11/2024, 8:38 AMRenan Kummer
10/11/2024, 5:09 PMAntonio Acuña Prieto
10/12/2024, 12:31 PMe5l
10/15/2024, 11:45 AMe5l
10/15/2024, 11:50 AMabdl
10/18/2024, 12:54 AMinstall(Auth) {
bearer {
loadTokens {
BearerTokens(
accessToken = sessionHandler.getToken().first(),
refreshToken = ""
)
}
}
}
To resolve this, I added the following workaround to clear the token when a login request is made:
if (body is LoginRequest) {
httpClient.plugin(Auth).providers.filterIsInstance<BearerAuthProvider>().first()
.clearToken()
}
However, after upgrading to Ktor 3.0.0, the providers method is now unresolved.
How can I adapt this code to work with Ktor 3.0.0? Any advice or suggestions on how to handle this change would be greatly appreciated.