Open fangornoftheforest opened 2 years ago
Even we face the same issue in iOS. Is it possible to send only code to the front end without trying to get an access token? I was able to make it work by commenting our code in the block starting at line 127 and writing "completion(.success((this.client.credential, nil, responseParameters)))" and ByteowlsCapacitorOauth2.swift - line, commenting out else block and just writing "call.resolve(parameters)" worked for me. OAuth2Client.authenticate(), I had to put additional conditions to check if "code" existed in response, but maybe you can write code to make it consistent with android.
Flow type: Authorization code Platform: iOS Provider: Azure Error: ERR_NO_AUTHORIZATION_CODE
Code:
Plugin returns ERR_NO_AUTHORIZATION_CODE even though the authorization code is present in the response parameters at OAuth2Swift:127.
The flow I am using is to fetch the authorization code and pass this to our back-end to resolve the refresh and ID token. This works without issue on Android but seems to be a huge problem on iOS. I have tried to ignore the response and parse the redirect using appUrlOpen but there seems to be no way to access the codeVerifier. Any advice?