Skip to content

Commit

Permalink
fix: QR scan
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldavidw committed Jun 15, 2024
1 parent c706e41 commit 1ebf76b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Chronos/Services/OTPService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,17 @@ public class OTPService {
throw OTPError.invalidURL
}

var path = components.path

let tokenType = try getTokenType(from: host)
var token = Token()
token.type = tokenType

if !path.isEmpty {
path.remove(at: path.startIndex)
token.account = path
}

try updateToken(&token, with: components.queryItems)

return token
Expand Down

0 comments on commit 1ebf76b

Please sign in to comment.