mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-10-31 08:15:02 +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
|
||||
|
||||
@@ -22,6 +22,7 @@ object BuildTimeConfig {
|
||||
val URL_ACCEPTABLE_USE: String? = null
|
||||
val URL_PRIVACY: String? = null
|
||||
val URL_POLICY: String? = null
|
||||
val OAUTH_CLIENT_URL_PATH: String? = null
|
||||
val SERVICES_MAPTILER_BASE_URL: String? = null
|
||||
val SERVICES_MAPTILER_APIKEY: String? = null
|
||||
val SERVICES_MAPTILER_LIGHT_MAPID: String? = null
|
||||
|
||||
Reference in New Issue
Block a user