Migrate that to a ktor interceptor instead I think is your best bet.
For auth there is an auth plugin specifically made for this functionality. (edit: this perhaps
https://ktor.io/docs/client-auth.html#install_plugin)
Quick googling made me go here
https://ktor.io/docs/server-custom-plugins.html#on-call
I haven't done this for ktor, but I have for apollo-kotlin, where I also had interceptors in OkHttp land, but I just had to migrate them to the apollo-kotlin multiplatform compatible interceptors instead. So it should be the same here I would guess.