OAuth2 icon indicating copy to clipboard operation
OAuth2 copied to clipboard

"invalid_grant" error in google authentication only for iOS 16 devices.

Open archana211 opened this issue 3 years ago • 0 comments

Hello, For iOS 16 device getting "invalid_grant"(Bad Request) error. The same code is working for the iOS 15.1 version.

Code setup: self.oauth2 = OAuth2CodeGrant(settings: [ "client_id": “XXXXX”, "authorize_uri": "https://accounts.google.com/o/oauth2/v2/auth", "token_uri": "https://www.googleapis.com/oauth2/v4/token", "redirect_uris": [“XXXX"], "scope": "https://www.googleapis.com/auth/youtube.upload", "use_keychain": true, "keychain_access_mode": kSecAttrAccessibleAfterFirstUnlock, "keychain_account_for_tokens": “XXXXXX”, ] as OAuth2JSON)

self.oauth2.authorize { result, error in print("error",error?.localizedDescription) // The operation couldn’t be completed. (Base.OAuth2Error error 13.) }

Testing version: p2/OAuth2: Master branch's latest version, Realdevices: iPhone 11 (iOS16) - not working, iphone 11(iOS 15.1) - working.

archana211 avatar Sep 26 '22 06:09 archana211