mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Changed SSO redirect URI scheme, updated default SSO URI, delete saved config in case of token refresh error before retrying
This commit is contained in:
parent
bfd5a8f6fa
commit
f93e771bab
2 changed files with 11 additions and 4 deletions
|
|
@ -174,7 +174,7 @@ dependencies {
|
|||
implementation 'com.google.firebase:firebase-crashlytics-ndk'
|
||||
|
||||
implementation 'net.openid:appauth:0.11.1'
|
||||
android.defaultConfig.manifestPlaceholders = [appAuthRedirectScheme: 'org.linphone.sso']
|
||||
android.defaultConfig.manifestPlaceholders = [appAuthRedirectScheme: 'org.linphone']
|
||||
|
||||
//noinspection GradleDynamicVersion
|
||||
implementation 'org.linphone:linphone-sdk-android:5.4.+'
|
||||
|
|
|
|||
|
|
@ -49,10 +49,10 @@ class OpenIdActivity : GenericActivity() {
|
|||
companion object {
|
||||
private const val TAG = "[Open ID Activity]"
|
||||
|
||||
private const val WELL_KNOWN = "https://auth.linphone.org:8443/realms/sip.linphone.org/.well-known/openid-configuration"
|
||||
private const val WELL_KNOWN = "https://sso.onhexagone.com//realms/ONHEXAGONE/.well-known/openid-configuration"
|
||||
private const val CLIENT_ID = "account"
|
||||
private const val SCOPE = "openid email profile"
|
||||
private const val REDIRECT_URI = "org.linphone.sso:/openidcallback"
|
||||
private const val REDIRECT_URI = "org.linphone:/openidcallback"
|
||||
private const val ACTIVITY_RESULT_ID = 666
|
||||
}
|
||||
|
||||
|
|
@ -187,7 +187,14 @@ class OpenIdActivity : GenericActivity() {
|
|||
}
|
||||
updateTokenInfo()
|
||||
} else {
|
||||
Log.e("$TAG Failed to perform token refresh [$ex]")
|
||||
Log.e(
|
||||
"$TAG Failed to perform token refresh [$ex], destroying auth_state.json file"
|
||||
)
|
||||
val file = File(applicationContext.filesDir.absolutePath, "auth_state.json")
|
||||
lifecycleScope.launch {
|
||||
FileUtils.deleteFile(file.absolutePath)
|
||||
singleSignOn()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue