diff --git a/CHANGES.md b/CHANGES.md index 83c825c21e..8a7b82c77b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,9 @@ +Changes in Element 1.0.13 (2020-12-18) +=================================================== + +Bugfix 🐛: + - Fix MSC2858 implementation details (#2540) + Changes in Element 1.0.12 (2020-12-15) =================================================== diff --git a/docs/signin.md b/docs/signin.md index 06f715c46b..0a234d2a20 100644 --- a/docs/signin.md +++ b/docs/signin.md @@ -165,7 +165,7 @@ In this case, the user can click on "Sign in with SSO" and the native web browse > https://homeserver.with.sso/_matrix/client/r0/login/sso/redirect?redirectUrl=element%3A%2F%element -The parameter `redirectUrl` is set to `element://element`. +The parameter `redirectUrl` is set to `element://connect`. ChromeCustomTabs are an intermediate way to display a WebPage, between a WebView and using the external browser. More info can be found [here](https://developer.chrome.com/multidevice/android/customtabs) @@ -175,7 +175,7 @@ During the process, user may be asked to validate an email by clicking on a link Once the process is finished, the web page will call the `redirectUrl` with an extra parameter `loginToken` -> element://element?loginToken=MDAxOWxvY2F0aW9uIG1vemlsbGEub3JnCjAwMTNpZGVudGlmaWVy +> element://connect?loginToken=MDAxOWxvY2F0aW9uIG1vemlsbGEub3JnCjAwMTNpZGVudGlmaWVy This navigation is intercepted by Element by the `LoginActivity`, which will then ask the homeserver to convert this `loginToken` to an access token diff --git a/fastlane/metadata/android/en-US/changelogs/40100130.txt b/fastlane/metadata/android/en-US/changelogs/40100130.txt new file mode 100644 index 0000000000..39715c2910 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/40100130.txt @@ -0,0 +1,2 @@ +Main changes in this version: URL Preview, new Emoji keyboard, new room settings capabilities, and snow for Christmas! +Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.0.12 \ No newline at end of file diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/Constants.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/Constants.kt index 871c2559f8..7d18aba627 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/Constants.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/Constants.kt @@ -33,5 +33,6 @@ const val REGISTER_FALLBACK_PATH = "/_matrix/static/client/register/" * Ref: https://matrix.org/docs/spec/client_server/latest#sso-client-login */ const val SSO_REDIRECT_PATH = "/_matrix/client/r0/login/sso/redirect" +const val MSC2858_SSO_REDIRECT_PATH = "/_matrix/client/unstable/org.matrix.msc2858/login/sso/redirect" const val SSO_REDIRECT_URL_PARAM = "redirectUrl" diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/data/LoginFlowResponse.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/data/LoginFlowResponse.kt index c333b3524e..2b26115f30 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/data/LoginFlowResponse.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/data/LoginFlowResponse.kt @@ -42,6 +42,6 @@ internal data class LoginFlow( * the client can show a button for each of the supported providers * See MSC #2858 */ - @Json(name = "identity_providers") + @Json(name = "org.matrix.msc2858.identity_providers") val ssoIdentityProvider: List? ) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/identity/IdentityBulkLookupTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/identity/IdentityBulkLookupTask.kt index 3b0d514cf3..a03bef9501 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/identity/IdentityBulkLookupTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/identity/IdentityBulkLookupTask.kt @@ -93,7 +93,7 @@ internal class DefaultIdentityBulkLookupTask @Inject constructor( } catch (failure: Throwable) { // Catch invalid hash pepper and retry if (canRetry && failure is Failure.ServerError && failure.error.code == MatrixError.M_INVALID_PEPPER) { - // This is not documented, by the error can contain the new pepper! + // This is not documented, but the error can contain the new pepper! if (!failure.error.newLookupPepper.isNullOrEmpty()) { // Store it and use it right now hashDetailResponse.copy(pepper = failure.error.newLookupPepper) diff --git a/vector/build.gradle b/vector/build.gradle index 7bb8ca187c..70d38b1c2a 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -17,7 +17,7 @@ androidExtensions { // Note: 2 digits max for each value ext.versionMajor = 1 ext.versionMinor = 0 -ext.versionPatch = 12 +ext.versionPatch = 13 static def getGitTimestamp() { def cmd = 'git show -s --format=%ct' diff --git a/vector/src/main/AndroidManifest.xml b/vector/src/main/AndroidManifest.xml index bf839b807c..4ad51fdea7 100644 --- a/vector/src/main/AndroidManifest.xml +++ b/vector/src/main/AndroidManifest.xml @@ -95,8 +95,9 @@ - - + diff --git a/vector/src/main/java/im/vector/app/features/login/LoginViewState.kt b/vector/src/main/java/im/vector/app/features/login/LoginViewState.kt index 383fd4a54e..5254abf1d9 100644 --- a/vector/src/main/java/im/vector/app/features/login/LoginViewState.kt +++ b/vector/src/main/java/im/vector/app/features/login/LoginViewState.kt @@ -23,6 +23,7 @@ import com.airbnb.mvrx.PersistState import com.airbnb.mvrx.Success import com.airbnb.mvrx.Uninitialized import im.vector.app.core.extensions.appendParamToUrl +import org.matrix.android.sdk.api.auth.MSC2858_SSO_REDIRECT_PATH import org.matrix.android.sdk.api.auth.SSO_REDIRECT_PATH import org.matrix.android.sdk.api.auth.SSO_REDIRECT_URL_PARAM @@ -72,9 +73,11 @@ data class LoginViewState( fun getSsoUrl(providerId: String?): String { return buildString { append(homeServerUrl?.trim { it == '/' }) - append(SSO_REDIRECT_PATH) if (providerId != null) { + append(MSC2858_SSO_REDIRECT_PATH) append("/$providerId") + } else { + append(SSO_REDIRECT_PATH) } // Set a redirect url we will intercept later appendParamToUrl(SSO_REDIRECT_URL_PARAM, VECTOR_REDIRECT_URL) @@ -87,6 +90,6 @@ data class LoginViewState( companion object { // Note that the domain can be displayed to the user for confirmation that he trusts it. So use a human readable string - private const val VECTOR_REDIRECT_URL = "element://element" + private const val VECTOR_REDIRECT_URL = "element://connect" } }