mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 08:03:50 +02:00
Check login intents match between QR code and current flow
This commit is contained in:
committed by
Stefan Ceriu
parent
d422e3ea1d
commit
68461d5fd5
+2
-3
@@ -169,7 +169,8 @@ class QRLoginService: NSObject, QRLoginServiceProtocol {
|
||||
MXLog.debug("[QRLoginService] processQRLoginCode: \(code)")
|
||||
state = .connectingToDevice
|
||||
|
||||
guard let uri = code.rendezvous.transport?.uri,
|
||||
guard code.intent == QRLoginRendezvousPayload.Intent.loginReciprocate.rawValue,
|
||||
let uri = code.rendezvous.transport?.uri,
|
||||
let rendezvousURL = URL(string: uri),
|
||||
let key = code.rendezvous.key else {
|
||||
MXLog.debug("[QRLoginService] QR code invalid")
|
||||
@@ -190,8 +191,6 @@ class QRLoginService: NSObject, QRLoginServiceProtocol {
|
||||
|
||||
state = .waitingForConfirmation(validationCode)
|
||||
|
||||
// TODO: check compatibility of intents
|
||||
|
||||
MXLog.debug("[QRLoginService] Waiting for available protocols")
|
||||
guard case let .success(data) = await rendezvousService.receive(),
|
||||
let responsePayload = try? JSONDecoder().decode(QRLoginRendezvousPayload.self, from: data) else {
|
||||
|
||||
Reference in New Issue
Block a user