Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QR Code Login Flow #2767

Merged
merged 56 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
4a42e4d
progress
Velin92 Apr 12, 2024
9744e6d
qr code scanning now works, but the API is still unstable
Velin92 Apr 15, 2024
aee72b7
code improvements
Velin92 Apr 16, 2024
04aa596
code improvements
Velin92 Apr 16, 2024
086cb30
improved state handling
Velin92 Apr 18, 2024
223cf43
improved the flow
Velin92 Apr 22, 2024
529d943
the flow can now reach the login state
Velin92 Apr 22, 2024
1ff6cb4
now the code has also a string representation
Velin92 Apr 23, 2024
107f1fa
fix onboarding
Velin92 Apr 23, 2024
1060bf6
possible fix
Velin92 Apr 24, 2024
00345b2
qr code flow
Velin92 Apr 26, 2024
3741c62
possible fix
Velin92 Apr 26, 2024
9d2f179
fix for the connecting state not working properly
Velin92 Apr 29, 2024
638c298
Merge branch 'develop' of https://github.com/vector-im/element-x-ios …
Velin92 Apr 29, 2024
64b7934
Discard changes to ElementX.xcodeproj/project.xcworkspace/xcshareddat…
Velin92 Apr 29, 2024
45c04c5
updated copies
Velin92 Apr 29, 2024
af91e01
better code in the view model
Velin92 Apr 29, 2024
94dcff7
accountURL is now async
hughns Apr 30, 2024
5bd9dbb
Refix
hughns Apr 30, 2024
2beb697
Revert "Refix"
Velin92 Apr 30, 2024
da7af70
Revert "accountURL is now async"
Velin92 Apr 30, 2024
62bc4b8
Merge branch 'develop' of https://github.com/vector-im/element-x-ios …
Velin92 Apr 30, 2024
6854682
better error handling for now
Velin92 May 2, 2024
94b6798
qr code login sdk update for pr building
Velin92 May 2, 2024
6ea8cde
Merge branch 'develop' into mauroromito/qr_code_api_testing
Velin92 May 2, 2024
4dd54d8
updated tests
Velin92 May 2, 2024
525979b
Merge branch 'mauroromito/qr_code_api_testing' of https://github.com/…
Velin92 May 2, 2024
63efacb
added some view model tests
Velin92 May 2, 2024
5e652ab
test improvement
Velin92 May 2, 2024
6adbc02
Merge branch 'develop' of https://github.com/vector-im/element-x-ios …
Velin92 May 7, 2024
85acde7
updated the branch
Velin92 May 7, 2024
8bdd4f7
Merge branch 'develop' into mauroromito/qr_code_api_testing
Velin92 May 7, 2024
d5b5604
updated strings
Velin92 May 9, 2024
44acd0a
Merge branch 'develop' of https://github.com/vector-im/element-x-ios …
Velin92 May 17, 2024
16fe49f
Merge branch 'develop' of https://github.com/vector-im/element-x-ios …
Velin92 May 20, 2024
b44498e
error handling
Velin92 May 20, 2024
dd9447d
fixing tests
Velin92 May 20, 2024
6b4d84e
code improvement
Velin92 May 21, 2024
6b56f17
updated qr code login
Velin92 May 21, 2024
a3ac12a
Merge branch 'develop' of https://github.com/vector-im/element-x-ios …
Velin92 May 23, 2024
a60b19a
updated previews and added an error for the
Velin92 May 23, 2024
26dfc77
Merge branch 'develop' of https://github.com/vector-im/element-x-ios …
Velin92 May 29, 2024
1e7b74b
updated sdk
Velin92 May 29, 2024
ce9dc5e
fixed tests
Velin92 May 29, 2024
b70c072
qr code login enabled is by default false
Velin92 May 29, 2024
8c49170
added a new error case
Velin92 May 29, 2024
f7c3bd1
Apply suggestions from code review
Velin92 May 29, 2024
6af30f3
some pr comments have been addressed
Velin92 May 29, 2024
58587e8
updated proj
Velin92 May 29, 2024
e21df9c
moved request camera in app mediator
Velin92 May 29, 2024
a8b870b
added a test for qr code decoding
Velin92 May 29, 2024
10c13e0
enable the feature for development builds by default
Velin92 May 29, 2024
0c099dc
Merge branch 'develop' into mauroromito/qr_code_api_testing
Velin92 May 29, 2024
0129a1b
qr code login always enabled in nightly
Velin92 May 29, 2024
848c6ee
removed from developer settings
Velin92 May 29, 2024
683a534
Merge branch 'mauroromito/qr_code_api_testing' of https://github.com/…
Velin92 May 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions ElementX.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@
523C6800ED85D5810CF18C19 /* OIDCAccountSettingsPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1D737F4672021D0A7D218CD /* OIDCAccountSettingsPresenter.swift */; };
52473A4D7B1FBD4CD1E770C8 /* MatrixEntityRegex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD1A853D605C2146B0DC028 /* MatrixEntityRegex.swift */; };
5375902175B2FEA2949D7D74 /* LoginScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CDDDDD9FE1A699D23A5E096 /* LoginScreen.swift */; };
538426B497672A097B212735 /* QRCodeLoginController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80A07343F18BB8EAC17B07B7 /* QRCodeLoginController.swift */; };
53A55748D5F587C9061F98BF /* ServerConfigurationScreenViewStateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 277C20CDD5B64510401B6D0D /* ServerConfigurationScreenViewStateTests.swift */; };
53A59720F4729D9BBFFB7CAB /* NotificationSettingsEditScreenCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD9CB3B9DFA353AB2B7CD9F8 /* NotificationSettingsEditScreenCoordinator.swift */; };
53C1E7F6A7D6409D89F36ED7 /* AggregatedReactionMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69CB8242D69B7E4D0B32E18D /* AggregatedReactionMock.swift */; };
Expand Down Expand Up @@ -837,6 +836,7 @@
C85C7A201E4CFDA477ACEBEB /* AppLockSetupSettingsScreenViewModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8610C1D21565C950BCA6A454 /* AppLockSetupSettingsScreenViewModelProtocol.swift */; };
C8A9C595038AFA2D707AC8C1 /* NotificationPermissionsScreenViewModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20E69F67D2A70ABD08CA6D54 /* NotificationPermissionsScreenViewModelProtocol.swift */; };
C8BD80891BAD688EF2C15CDB /* MediaUploadPreviewScreenCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74DD0855F2F76D47E5555082 /* MediaUploadPreviewScreenCoordinator.swift */; };
C8C7AF33AADF88B306CD2695 /* QRCodeLoginService.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4427AF4B7FB7EF3E3D424C7 /* QRCodeLoginService.swift */; };
C8E0FA0FF2CD6613264FA6B9 /* MessageForwardingScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFEA446F8618DBA79A9239CC /* MessageForwardingScreen.swift */; };
C97325EFDCCEE457432A9E82 /* MessageText.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1E0B4A34E69BD2132BEC521 /* MessageText.swift */; };
C9BE065FA7D4E77E4C61CB69 /* MapLibreModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = B81B6170DB690013CEB646F4 /* MapLibreModels.swift */; };
Expand All @@ -858,6 +858,7 @@
CDAE3A37D4DF136F9D07DB61 /* RoomChangeRolesScreenSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAF710CB1C31F8938EAA3A7D /* RoomChangeRolesScreenSection.swift */; };
CDCA8A559E098503DDE29477 /* AttributedStringBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5C6FBF97B6EED3D4FA5EFF /* AttributedStringBuilder.swift */; };
CE1694C7BB93C3311524EF28 /* Untranslated.strings in Resources */ = {isa = PBXBuildFile; fileRef = D2F7194F440375338F8E2487 /* Untranslated.strings */; };
CE3B7FC34FB2C279AAA5EA01 /* AVMetadataMachineReadableCodeObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3339B1DDB1341E833D2555BC /* AVMetadataMachineReadableCodeObject.swift */; };
CE6F237360875D3D573FD0B2 /* RoomNotificationSettingsProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD6B522BD637845AB9570B10 /* RoomNotificationSettingsProxy.swift */; };
CE9530A4CA661E090635C2F2 /* NotificationItemProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25F7FE40EF7490A7E09D7BE6 /* NotificationItemProxy.swift */; };
CEAEA57B7665C8E790599A78 /* BlockedUsersScreenViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 240610DF32F3213BEC5611D7 /* BlockedUsersScreenViewModelTests.swift */; };
Expand Down Expand Up @@ -941,6 +942,7 @@
E313BDD2B8813144139B2E00 /* UserDiscoveryServiceTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0287793F11C480E242B03DF5 /* UserDiscoveryServiceTest.swift */; };
E3291AD16D7A5CB14781819C /* UserNotificationCenterProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45D8149FDDA0315CDC553B4B /* UserNotificationCenterProtocol.swift */; };
E32A18802EB37EEE3EF7B965 /* GlobalSearchScreenViewModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B788615712FED326F73D3F83 /* GlobalSearchScreenViewModelProtocol.swift */; };
E362924A42934C9F0F97A956 /* OIDCConfigurationProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = A69869844D2B6F5BD9AABF85 /* OIDCConfigurationProxy.swift */; };
E37044401D9951D6C02C0855 /* TracingConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED003DF1B7CF40E7073A2280 /* TracingConfiguration.swift */; };
E3AC72E3E58F364EF15C1CC7 /* NotificationSettingsScreenViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 514363244AE7D68080D44C6F /* NotificationSettingsScreenViewModelTests.swift */; };
E3CA565A4B9704F191B191F0 /* JoinedRoomSize+MemberCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBF9AEA706926DD0DA2B954C /* JoinedRoomSize+MemberCount.swift */; };
Expand Down Expand Up @@ -1333,6 +1335,7 @@
32B5E17028C02DFA7DDA3931 /* RoomMemberProxyProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMemberProxyProtocol.swift; sourceTree = "<group>"; };
32C5DAA1773F57653BF1C4F9 /* SoftLogoutViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoftLogoutViewModelTests.swift; sourceTree = "<group>"; };
330AF4D121C3396F7A14B21D /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = id.lproj/SAS.strings; sourceTree = "<group>"; };
3339B1DDB1341E833D2555BC /* AVMetadataMachineReadableCodeObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AVMetadataMachineReadableCodeObject.swift; sourceTree = "<group>"; };
3368395F06AA180138E185B6 /* PollFormScreenUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollFormScreenUITests.swift; sourceTree = "<group>"; };
33AE897D86784CCA5E4E9227 /* ElementCallService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElementCallService.swift; sourceTree = "<group>"; };
33E49C5C6F802B4D94CA78D1 /* ro */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ro; path = ro.lproj/Localizable.strings; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1625,7 +1628,6 @@
7F615A00DB223FF3280204D2 /* UserDiscoveryServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDiscoveryServiceProtocol.swift; sourceTree = "<group>"; };
7FB2253D36E81E045E1CB432 /* Duration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Duration.swift; sourceTree = "<group>"; };
7FDF541AE914059942B575B4 /* IdentityConfirmationScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IdentityConfirmationScreenModels.swift; sourceTree = "<group>"; };
80A07343F18BB8EAC17B07B7 /* QRCodeLoginController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRCodeLoginController.swift; sourceTree = "<group>"; };
80C4927D09099497233E9980 /* WaitlistScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistScreen.swift; sourceTree = "<group>"; };
80E815FF3CC5E5A355E3A25E /* RoomMessageEventStringBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMessageEventStringBuilder.swift; sourceTree = "<group>"; };
8166F121C79C7B62BF01D508 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = pt; path = pt.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1767,6 +1769,7 @@
A436057DBEA1A23CA8CB1FD7 /* UIFont+AttributedStringBuilder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIFont+AttributedStringBuilder.h"; sourceTree = "<group>"; };
A58E93D91DE3288010390DEE /* EmojiDetectionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiDetectionTests.swift; sourceTree = "<group>"; };
A65F140F9FE5E8D4DAEFF354 /* RoomProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomProxy.swift; sourceTree = "<group>"; };
A69869844D2B6F5BD9AABF85 /* OIDCConfigurationProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OIDCConfigurationProxy.swift; sourceTree = "<group>"; };
A6B891A6DA826E2461DBB40F /* PHGPostHogConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PHGPostHogConfiguration.swift; sourceTree = "<group>"; };
A6C11AD9813045E44F950410 /* ElementCallWidgetDriverProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElementCallWidgetDriverProtocol.swift; sourceTree = "<group>"; };
A73A07BAEDD74C48795A996A /* AsyncSequence.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncSequence.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1830,6 +1833,7 @@
B40233F2989AD49906BB310D /* RoomPollsHistoryScreenViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomPollsHistoryScreenViewModelTests.swift; sourceTree = "<group>"; };
B410B32B72C90BF94E481F33 /* AppLockSetupPINScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLockSetupPINScreenModels.swift; sourceTree = "<group>"; };
B43456E73F8A2D52B69B9FB9 /* TemplateScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateScreenViewModel.swift; sourceTree = "<group>"; };
B4427AF4B7FB7EF3E3D424C7 /* QRCodeLoginService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRCodeLoginService.swift; sourceTree = "<group>"; };
B48B7AD4908C5C374517B892 /* MapAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = MapAssets.xcassets; sourceTree = "<group>"; };
B4CFE236419E830E8946639C /* Analytics+SwiftUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Analytics+SwiftUI.swift"; sourceTree = "<group>"; };
B50F03079F6B5EF9CA005F14 /* TimelineProxyProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineProxyProtocol.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2977,6 +2981,7 @@
3E93A1BE7D8A2EBCAD51EEB4 /* Array.swift */,
A73A07BAEDD74C48795A996A /* AsyncSequence.swift */,
52BD6ED18E2EB61E28C340AD /* AttributedString.swift */,
3339B1DDB1341E833D2555BC /* AVMetadataMachineReadableCodeObject.swift */,
B6E89E530A8E92EC44301CA1 /* Bundle.swift */,
A9FAFE1C2149E6AC8156ED2B /* Collection.swift */,
E2B1CC9AA154F4D5435BF60A /* Comparable.swift */,
Expand Down Expand Up @@ -3474,7 +3479,7 @@
70CC0CDA4AFDF8299C56ADE7 /* QRCode */ = {
isa = PBXGroup;
children = (
80A07343F18BB8EAC17B07B7 /* QRCodeLoginController.swift */,
B4427AF4B7FB7EF3E3D424C7 /* QRCodeLoginService.swift */,
536C0E2178949B290776EA4E /* QRCodeLoginServiceProtocol.swift */,
);
path = QRCode;
Expand Down Expand Up @@ -4338,6 +4343,7 @@
CF48AF076424DBC1615C74AD /* AuthenticationServiceProxy.swift */,
4F0CB536D1C3CC15AA740CC6 /* AuthenticationServiceProxyProtocol.swift */,
65C2B80DD0BF6F10BB5FA922 /* MockAuthenticationServiceProxy.swift */,
A69869844D2B6F5BD9AABF85 /* OIDCConfigurationProxy.swift */,
);
path = Authentication;
sourceTree = "<group>";
Expand Down Expand Up @@ -5812,6 +5818,7 @@
buildActionMask = 2147483647;
files = (
41F553349AF44567184822D8 /* APNSPayload.swift in Sources */,
CE3B7FC34FB2C279AAA5EA01 /* AVMetadataMachineReadableCodeObject.swift in Sources */,
70394ECD2DCC70741538620D /* AccessibilityIdentifiers.swift in Sources */,
34433A509DFEC93579B3B35B /* AdvancedSettingsScreen.swift in Sources */,
4557192F5B15A8D9BB920232 /* AdvancedSettingsScreenCoordinator.swift in Sources */,
Expand Down Expand Up @@ -6185,6 +6192,7 @@
CBD2ABE4C1A47ECD99E1488E /* NotificationSettingsScreenViewModelProtocol.swift in Sources */,
523C6800ED85D5810CF18C19 /* OIDCAccountSettingsPresenter.swift in Sources */,
9A4E3D5AA44B041DAC3A0D81 /* OIDCAuthenticationPresenter.swift in Sources */,
E362924A42934C9F0F97A956 /* OIDCConfigurationProxy.swift in Sources */,
11A6B8E3CBDBF0A4107FF4CE /* OnboardingFlowCoordinator.swift in Sources */,
3CE4C5071B6D2576E2473989 /* OrderedSet.swift in Sources */,
AA5924D3B67F7ACD98BBEFDC /* OrientationManagerProtocol.swift in Sources */,
Expand Down Expand Up @@ -6224,12 +6232,12 @@
C7ABEBECDC513F7887DACF66 /* ProgressMaskModifier.swift in Sources */,
9B356742E035D90A8BB5CABE /* ProposedViewSize.swift in Sources */,
2835FD52F3F618D07F799B3D /* Publisher.swift in Sources */,
538426B497672A097B212735 /* QRCodeLoginController.swift in Sources */,
4949C8C12669D1B5E082366E /* QRCodeLoginScreen.swift in Sources */,
4D23D41B8109E010304050F8 /* QRCodeLoginScreenCoordinator.swift in Sources */,
46FCD999E92D9717D24AAB94 /* QRCodeLoginScreenModels.swift in Sources */,
30E5628F74AD3C27A061BF25 /* QRCodeLoginScreenViewModel.swift in Sources */,
E9D2ED1C4186931E3D5FDA4E /* QRCodeLoginScreenViewModelProtocol.swift in Sources */,
C8C7AF33AADF88B306CD2695 /* QRCodeLoginService.swift in Sources */,
90067BB37EBA60FA4AEF2DA3 /* QRCodeLoginServiceMock.swift in Sources */,
BB04B1D8E7401C90506D401E /* QRCodeLoginServiceProtocol.swift in Sources */,
FDD5B4B616D9FF4DE3E9A418 /* QRCodeScannerView.swift in Sources */,
Expand Down Expand Up @@ -7323,7 +7331,7 @@
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
requirement = {
kind = exactVersion;
version = 1.0.4;
version = 1.0.5;
};
};
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/element-hq/matrix-rust-components-swift",
"state" : {
"revision" : "100598671d3e6186f77e2f48630e9cbcb63fd86b",
"version" : "1.0.4"
"revision" : "535c89c5cbc9d748632397a079e2d086e1b5b386",
"version" : "1.0.5"
}
},
{
Expand Down
10 changes: 10 additions & 0 deletions ElementX/Resources/Localizations/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,16 @@
"screen_qr_code_login_connection_note_secure_state_title" = "Connection not secure";
"screen_qr_code_login_device_code_subtitle" = "You’ll be asked to enter the two digits shown on this device.";
"screen_qr_code_login_device_code_title" = "Enter the number below on your other device";
"screen_qr_code_login_error_cancelled_subtitle" = "The sign in was cancelled on the other device.";
"screen_qr_code_login_error_cancelled_title" = "Sign in request cancelled";
"screen_qr_code_login_error_declined_subtitle" = "The request on your other device was not accepted.";
"screen_qr_code_login_error_declined_title" = "Sign in declined";
"screen_qr_code_login_error_expired_subtitle" = "Sign in expired. Please try again.";
"screen_qr_code_login_error_expired_title" = "The sign in was not completed in time";
"screen_qr_code_login_error_linking_not_suported_subtitle" = "Your other device does not support signing in to %@ with a QR code.\n\nTry signing in manually, or scan the QR code with another device.";
"screen_qr_code_login_error_linking_not_suported_title" = "QR code not supported";
"screen_qr_code_login_error_sliding_sync_not_supported_subtitle" = "Your account provider does not support %1$@.";
"screen_qr_code_login_error_sliding_sync_not_supported_title" = "%1$@ not supported";
"screen_qr_code_login_initial_state_button_title" = "Ready to scan";
"screen_qr_code_login_initial_state_item_1" = "Open %1$@ on a desktop device";
"screen_qr_code_login_initial_state_item_2" = "Click on your avatar";
Expand Down
8 changes: 7 additions & 1 deletion ElementX/Sources/Application/AppCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -444,10 +444,16 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
}

private func startAuthentication() {
let encryptionKeyProvider = EncryptionKeyProvider()
let authenticationService = AuthenticationServiceProxy(userSessionStore: userSessionStore,
encryptionKeyProvider: EncryptionKeyProvider(),
encryptionKeyProvider: encryptionKeyProvider,
appSettings: appSettings)
let qrCodeLoginService = QRCodeLoginService(oidcConfiguration: appSettings.oidcConfiguration.rustValue,
encryptionKeyProvider: encryptionKeyProvider,
userSessionStore: userSessionStore)

authenticationFlowCoordinator = AuthenticationFlowCoordinator(authenticationService: authenticationService,
qrCodeLoginService: qrCodeLoginService,
bugReportService: ServiceLocator.shared.bugReportService,
navigationRootCoordinator: navigationRootCoordinator,
appMediator: appMediator,
Expand Down
9 changes: 9 additions & 0 deletions ElementX/Sources/Application/AppSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ final class AppSettings {
return url
}()

private(set) lazy var oidcConfiguration = OIDCConfigurationProxy(clientName: InfoPlistReader.main.bundleDisplayName,
redirectURI: oidcRedirectURL,
clientURI: websiteURL,
logoURI: logoURL,
tosURI: acceptableUseURL,
policyURI: privacyURL,
contacts: [supportEmailAddress],
staticRegistrations: oidcStaticRegistrations.mapKeys { $0.absoluteString })

/// A dictionary of accounts that have performed an initial sync through their proxy.
///
/// This is a temporary workaround. In the future we should be able to receive a signal from the
Expand Down
Loading
Loading