was wondering if theres a way to modify the "backi...
# supabase-kt
k
was wondering if theres a way to modify the "backing" storage of the auth refresh token/access token. like a callback function for retrieving from local storage - this way i can hook into the intellij storage sdk
part of it is that i don't fully understand how refresh/access tokens are stored locally. i think our users have mentioend they've been unauthed whenever they update the plugin
and im guessing its because the backing storage for the refresh tokens have changed after the update (not sure). i likely need to repro this on my end first
j
You can implement your own session manager:
Copy code
class CustomSessionStorage: SessionManager {
    
    override suspend fun saveSession(session: UserSession) {
        //Save the session to a custom storage
    }

    override suspend fun loadSession(): UserSession? {
        // Load the session from a custom storage
    }

    override suspend fun deleteSession() {
        // Delete the session from a custom storage
    }
    
}
Copy code
install(Auth)  {
    sessionManager = CustomSessionStorage()
}
part of it is that i don't fully understand how refresh/access tokens are stored locally.
By default they are stored with multiplatform-settings which provides default implementations for all targets. On JVM it uses ``Preferences.userRoot()``
👍 1
❤️ 1