diff --git a/Source/RestAPI/OktaAPI.swift b/Source/RestAPI/OktaAPI.swift index d7601a5..b3567d0 100644 --- a/Source/RestAPI/OktaAPI.swift +++ b/Source/RestAPI/OktaAPI.swift @@ -235,7 +235,11 @@ open class OktaAPI { let req = buildBaseRequest(completion: completion) req.baseURL = link.href req.method = .post - req.urlParams = [:] + if (factor.factorType == .sms) { + req.urlParams = ["updatePhone":"true"] + } else { + req.urlParams = [:] + } req.bodyParams = ["stateToken": stateToken] req.bodyParams?["factorType"] = factor.factorType.rawValue req.bodyParams?["provider"] = factor.provider?.rawValue