OAuth2
OAuth2 copied to clipboard
Failed to store tokens to keychain: Error Domain=swift.keychain.error Code=-34018
If I turn Keychain Sharing ON it works, but am I really supposed to do that?
Please see #130.
This doesn't give me an answer, I'm still forced to activate Keychain Sharing to avoid -34018 error
This seems to be a recurring problem with Xcode and simulator, see here: http://stackoverflow.com/questions/20344255/secitemadd-and-secitemcopymatching-returns-error-code-34018-errsecmissingentit/24120485#24120485
Are you also getting the same issue on device?
I'm not having the issue on device (tried only with iOS9 not 10), but still I have to keep it activated for developing purpose (through simulator..)
I know, I have the same issue, but this is a problem with Xcode/Simulator. I'll keep this open for the error code -34018 specifically.
I got a problem with the keychain and I saw the various issues that references to this one so I am trying here.
I get this output when running forgetTokens():
[Debug] OAuth2: Forgetting tokens and removing them from keychain
[Warn!] OAuth2: Failed to delete tokens from keychain: Error Domain=swift.keychain.error Code=-25300 "(null)"
I use the OAuth2PasswordGrant and I checked that I only have one instance of it.
It doesn't matter if I set keychain to false or true, the access- and refresh token are not persisted and it keeps throwing the above error.
I am using Xcode 10.0 with Swift 4.2 and version 4.0.1 of the framework integrated using Carthage. Keychain sharing is turned off since I don't want the limitions of that, but I briefly tried to turn it on and run it again, but it didn't help.
Does anyone know what could be wrong?
Anyone? @p2 ?
I was using obtainAccessToken() directly instead of using authorize() which then skips the part where it persists the tokens in the keychain. So I couldn't forget the tokens because they never got there...