firebase-kotlin-sdk
firebase-kotlin-sdk copied to clipboard
iOS Auth Timeout
I'm having difficulty implementing this on iOS - it's kind of working, but about 30 minutes after logging in, I can no longer connect to the realtime database. If I log out and back in, it works again.
I assume this has something to do with token refreshing - it seems to be working fine on the Android side (I'm not seeing any issues!), but the token doesn't appear to be automatically refreshing on the iOS side, so I'm guessing I've not got something configured correctly,
Once the user logs in to our server, we call Firebase.auth.signInWithCustomToken(token), but don't appear to be doing anything else in either shared or android code with firebase authentication.
Again, things are working fine on Android (firebase auth isn't timing out), and on iOS it works for approx 30 minutes after I call signInWithCustomToken, but then my authentication seems to expire.
What am I missing?
I'm using static frameworks, and Firebase is added via CocoaPods:
From shared build.gradle.kts
cocoapods {
summary = "Some description for the Shared Module"
homepage = "Link to the Shared Module homepage"
version = "1.0"
ios.deploymentTarget = "14.1"
podfile = project.file("../iosApp/Podfile")
framework {
baseName = "shared"
isStatic = true
export("dev.icerock.moko:resources:${rootProject.extra["mokoVersion"]}")
export("dev.icerock.moko:graphics:0.9.0")
}
}
Podfile:
target 'iosApp' do
use_frameworks! :linkage => :static
platform :ios, '14.1'
pod 'shared', :path => '../shared'
pod 'Firebase'
pod 'FirebaseAuth'
pod 'FirebaseDatabase'
pod 'FirebaseMessaging'
pod 'SKCountryPicker'
pod 'ExytePopupView'
end
Did you check this project?