Confrmo Louis-James Davis

Keeping Confrmo sessions alive on Android

Why Confrmo on Android renews sessions with its own serialisation settings. The kotlinx.serialization behaviour that makes it matter.

What I tried

Confrmo sessions on Android renew quietly in the background. The first version renewed using the app's shared serialisation settings.

Why I chose differently

Those settings rename fields in a way that overrides even names you have pinned, so renewal and the server spoke slightly different languages. Sign-in had its own settings, which is why it matched from the start.

What I chose

Renewal now uses the same settings as sign-in. A declined renewal says so clearly. I verified it on a Pixel starting from an expired session.

The principle

In kotlinx.serialization a naming strategy wins over names you pin. Only settings without the strategy keep them.

  • Kotlin
  • kotlinx.serialization
  • OAuth tokens
  • Android