Commit Graph

26 Commits

Author SHA1 Message Date
Doug
cb5c7337d2 Add support for Account Provisioning links. (#4108)
* Add support for account provisioning links and route them to the authentication flow.

* Use the provisioning parameters to configure the authentication flow.

* Add UI tests for the provisioned authentication flow.

* Record new preview snapshots.

* Add unit tests.

* Make the domain configurable in the app settings.

* Use the loginHint in the login screen too.
2025-05-12 13:28:34 +01:00
Mauro Romito
6c07af84cc sdk: update to 25.04.14 2025-04-14 14:15:42 +02:00
Doug
2461933993 Simplify authentication logic
matrix.org now supports MAS so we don't need the web registration helper anymore.
2025-04-11 11:22:39 +01:00
Mauro Romito
0ee2199645 updated the SDK to 25.03.24 2025-03-25 12:17:11 +01:00
Stefan Ceriu
1ae6fc67c4 SDK update (#3891)
* Bump the RustSDK to v25.03.11

* Replace oidc login prompt with nil following the changes from https://github.com/matrix-org/matrix-rust-sdk/pull/4761

```
/// * `prompt` - The desired user experience in the web UI. No value means
///   that the user wishes to login into an existing account, and a value of
///   `Create` means that the user wishes to register a new account.
```

* Fix trailing closure warnings

* Update the client proxy after making `getNotificationSettings()` and  `cachedAvatarUrl()` async (they used to be blocking on the rust side).

* Move `Room.isEncrypted` to the info publisher and manually update the encryption state when creating the room.

* Bump the SDK again to v25.03.12 - This introduces a new way to configure the tokio runtime that we can use to have extensions use less memory
- introduce a new Target struct that takes care of setting up rust services (tracing and tokio) for our various targets
- cleanup MXLog and friends

* Address PR comments

* Bump the SDK again, switch back to using `.consent` as the OIDC login prompt (which was reintroduced in matrix-org/matrix-rust-sdk/pull/4791)
2025-03-13 11:17:37 +02:00
Mauro
63d059b342 updated the SDK (#3737) 2025-02-04 16:57:39 +00:00
manuroe
c29f4cc9b4 Dual licensing: AGPL + Element Commercial (#3657)
* New LICENSE-COMMERCIAL file

* Apply dual licenses: AGPL + Element Commercial to file headers

* Update README with dual licensing
2025-01-06 11:27:37 +01:00
Stefan Ceriu
51751606ca Adopt various rust side Timeline API additions (#3423)
* Adopt new reaction toggling API introduced in matrix-org/matrix-rust-sdk/pull/4127

* Adopt the changes introduced in matrix-org/matrix-rust-sdk/pull/4111: use the new `TimelineUniqueId` type instead of `String` for unique timeline identifiers.

* Bump the RustSDK to v1.0.58.

* Fix unit tests
2024-10-16 19:08:34 +03:00
Doug
e95fb7c27e Move the core logic in LoginScreenCoordinator into the ViewModel. (#3348) 2024-10-01 13:09:45 +01:00
Doug
aec4e3e8ca Selecting a server that doesn't support login now fails instead of letting you continue to a failure later. (#3342)
* Fail configuration of the authentication service if the homeserver doesn't support login.

* Move the ServerSelectionCoordinator logic into the ViewModel.

- Handle the new login alert.
- Add more tests
2024-09-27 13:58:05 +01:00
Doug
94f5879639 Configure the AuthenticationService later now that we have 2 flows on the start screen. (#3316)
* Don't query the homeserver until confirming it (or selecting a different one).

* Setup the infrastructure to test AuthenticationService.

Implement basic tests for configuration & password login.

* Use the real AuthenticationService with a mock Client in all of the tests.

* Add tests for the ServerConfirmationScreenViewModel.

* Remove redundant view state and test for it.
2024-09-25 14:40:18 +01:00
Doug
700b740a48 Add a WebRegistrationScreen (not included in the flow yet). (#3281) 2024-09-16 11:03:29 +01:00
Doug
d1495f3178 Make the SessionDirectories type responsible for cleaning up data. (#3261) 2024-09-11 14:32:03 +01:00
Stefan Ceriu
5c9e13b200 Fixes #3147 - Remove the sliding sync proxy wait list 2024-09-09 12:41:28 +03:00
Stefan Ceriu
89eae00479 Switch license to AGPL (#3237)
* Switch license file to AGPL

* Update file copyright headers

* Update the default project file header
2024-09-06 16:34:30 +03:00
Doug
b171612ab7 Adopt sliding sync discovery for authentication. 2024-08-30 14:45:54 +03:00
Doug
a3e66d3e7e Update the SDK (#3196)
* Update the SDK.

* Fix API breaks on send failures and propagate the new type.

* Handle new SDK ShieldState.

* Set up the ClientBuilder's `cachePath` option.

* Delete the cacheDirectory during logout/clearCache.

* Add unit tests for RestorationToken decoding and SessionDirectories generation.
2024-08-27 11:06:26 +01:00
Doug
16e5c3e1a5 Rotate the session directory each time a new client is built for authentication. 2024-08-12 12:23:29 +01:00
Doug
94c9a04474 Automatically sign out when toggling the SSS feature flag. (#3071) 2024-07-23 11:55:51 +01:00
Doug
a141532355 Add a feature flag for Simplified Sliding Sync. (#3057)
* Disable SSS when logging out.

* Bump the SDK.
2024-07-18 10:16:51 +01:00
Doug
de07f441f0 Add a ClientBuilder hook. (#3056) 2024-07-18 09:47:37 +01:00
Doug
99309ddfd2 Use a Client in AuthenticationService now that the Rust one has been removed. (#2954)
* Replace Rust's Authentication service by building a Client.

* Drop the Proxy from AuthenticationServiceProxy[Protocol].

* Make sure to call abortOIDCLogin.

* Centralise common ClientBuilder code.

* Update the SDK.
2024-06-24 15:05:00 +01:00
Doug
5a1b9463bc #40: Use the Rust AuthenticationService.
* Update SDK package to 1.0.12-alpha.
* Use an app group for storage and stop stripping the http from the homeserver when configuring the service.
* Rename access token to restore token.
* Remove matrix.org server description inline with latest FTUE changes.
2022-07-27 10:57:16 +01:00
Doug
c125189b89 Enable blank line rules. (#132) 2022-07-06 16:01:50 +01:00
Doug
a272980b62 Add SwiftFormat to the project. (#129)
* Run swiftformat for whitespace.
* Run swiftformat with some rules.
2022-07-06 14:49:05 +01:00
Doug
88ce67603e #40: Add basic AuthenticationService and missing UI tests.
* Add MockAuthenticationService and ServerSelectionUITests.
* Add tests covering the Authentication flow.
2022-07-04 10:00:27 +01:00