1
我正在使用Auth0 SDK版本1.1.0。我正在使用openid名稱電子郵件offline_access範圍。我成功獲取成功響應中的憑證對象。但憑證的expiresIn對象始終爲零。Auth0憑證對象的過期日期屬性始終爲零
var parameters = [String: String]()
parameters["deviceToken"] = "This is a device token from iOS simulator"
parameters["device"] = UIDevice.current.identifierForVendor?.description ?? UIDevice.current.name
Auth0.authentication().login(usernameOrEmail: usernameField.text!, password: passwordField.text!,
multifactorCode: nil, connection: "Username-Password-Authentication",
scope: "openid name email offline_access",
parameters: parameters).start({ (result) in
switch result {
case .success(let credentials):
WSDataManger.sharedInstance.saveCredentials(credentials: credentials)
print("credentail expire date is \(credentials.expiresIn)")
case .failure(let error):
print("Failed to login: \(error.localizedDescription)")
})
}
如何獲取expiresIn date?
嗨,你找到任何解決方案嗎? – EderYif
@EderYif請檢查解決方案。 –