AppAuth-iOS icon indicating copy to clipboard operation
AppAuth-iOS copied to clipboard

NSKeyedUnarchiver.unarchivedObject(ofClass: OIDAuthState.self, from: decoded) not work

Open Al-Kuka opened this issue 3 years ago • 2 comments

Hi there, I have some bug with this package on macOS target: After stored data with methods: let encodedData = try NSKeyedArchiver.archivedData(withRootObject: authState!, requiringSecureCoding: false) defaults.set(encodedData, forKey: kAuthorizerKey) and unachieved with method: if let decoded = defaults.object(forKey: kAuthorizerKey) as? Data { do { let auth = try NSKeyedUnarchiver.unarchiveObject(with: decoded) as? OIDAuthState all work fine. But last method is deprecated. When I replaced last method with: let auth = try NSKeyedUnarchiver.unarchivedObject(ofClass: OIDAuthState.self, from: decoded) this failed with message in debugger area: *** Assertion failure in -[OIDAuthorizationRequest initWithConfiguration:clientId:clientSecret:scope:redirectURL:responseType:state:nonce:codeVerifier:codeChallenge:codeChallengeMethod:additionalParameters:], OIDAuthorizationRequest.m:147 2022-02-07 12:34:31.759062+0200 TestApp[23341:1292333] The response_type "(null)" isn't supported. AppAuth only supports the "code" or "code id_token" response_type.

Does anyone know how to fix this? Thanks!

Al-Kuka avatar Feb 09 '22 08:02 Al-Kuka

i have the same problem

JaoMcs avatar Jul 01 '24 20:07 JaoMcs

Has there been a solution found on how to tackle this?

BlueCobold avatar Jul 18 '24 07:07 BlueCobold