Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.
Merged
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion Sources/MagicSDK/Core/Relayer/Types/DPop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ func createJwt() -> String?{
let signingInput = headersB64 + "." + claimsB64
let signingInputData = signingInput.data(using: .utf8)!

let signature = try! privateKey.signature(for: signingInputData)
guard let signature = try? privateKey.signature(for: signingInputData) else {
// This can happen when the [secure enclave biometrics](https://developer.apple.com/forums/thread/682162?answerId=726099022#726099022) have changed such as when an app is auto-installed on a new device
return nil
}

let signatureB64 = base64UrlEncoded(signature.rawRepresentation)

Expand Down