mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Allow adding a path suffix to the OAuth client URI (#7286)
* Allow adding a path suffix to the OAuth client URI
This commit is contained in:
committed by
GitHub
parent
674354b1a6
commit
49692794f9
@@ -24,6 +24,11 @@ android {
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
buildConfigField(
|
||||
name = "OAUTH_CLIENT_URI_PATH",
|
||||
type = "String",
|
||||
value = BuildTimeConfig.OAUTH_CLIENT_URL_PATH?.let { "\"$it\"" } ?: "null",
|
||||
)
|
||||
buildConfigFieldStr(
|
||||
name = "CLIENT_URI",
|
||||
value = BuildTimeConfig.URL_WEBSITE ?: "https://element.io"
|
||||
|
||||
+4
-1
@@ -11,7 +11,10 @@ package io.element.android.libraries.matrix.api.auth
|
||||
import io.element.android.libraries.matrix.api.BuildConfig
|
||||
|
||||
object OAuthConfig {
|
||||
const val CLIENT_URI = BuildConfig.CLIENT_URI
|
||||
val CLIENT_URI = BuildConfig.OAUTH_CLIENT_URI_PATH?.let {
|
||||
// Concatenate the base URI and the path, ensuring there is exactly one '/' between them
|
||||
"${BuildConfig.CLIENT_URI.trimEnd('/')}/${it.trimStart('/')}"
|
||||
} ?: BuildConfig.CLIENT_URI
|
||||
|
||||
// Note: host must match with the host of CLIENT_URI
|
||||
const val LOGO_URI = BuildConfig.LOGO_URI
|
||||
|
||||
Reference in New Issue
Block a user