question

bassel avatar image
bassel asked bassel commented

Client Certificate Cancelled when running OAuth process

Hi,


Recently I was not able to perform OAuth flow from device by opening webview. The log shows the following error:

W/AwContents: onDetachedFromWindow called when already detached. Ignoring

E/chromium: [ERROR:aw_contents_client_bridge.cc(209)] Client certificate request cancelled

I/chromium: [INFO:CONSOLE(144)] "Uncaught SyntaxError: Unexpected token ILLEGAL", source: https://sandbox.dev.clover.com/oauth/authorize?client_id=NKH7ZDN1Z4CQJ (144)

I/chromium: [INFO:CONSOLE(0)] "The Content-Security-Policy directive 'child-src' is implemented behind a flag which is currently disabled.

", source: https://sandbox.dev.clover.com/dashboard/login?hardRedirect=true&webRedirectUrl=https%3A%2F%2Fsandbox.dev.clover.com%2Foauth%2Fauthorize%3Fclient_id%3DNKH7ZDN1Z4CQJ (0)

I/chromium: [INFO:CONSOLE(2)] "heapSampling", source: (2)

I/chromium: [INFO:CONSOLE(2)] "Uncaught SyntaxError: Unexpected identifier", source: https://sandbox.dev.clover.com/web-react/assets/main.main.e0aeb430b1ce68d571cc.js (2)

V/FA: Recording user engagement, ms: 309345

V/FA: Using local app measurement service

V/FA: Activity paused, time: 592460


Is the OAuth flow not working anymore as it was before?


Thanks


Clover FlexOAuth
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered bassel commented

I am not having any issues with the OAuth flow. Is your app running on a Clover device? If you are, you don't need to do this, please see - https://docs.clover.com/docs/oauth-for-web-views-non-clover-devices.

3 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bassel avatar image bassel commented ·

Hi David,


It is not working on both Clover Flex and non-clover android emulators. The oauth url is simply loading the page properly on google chrome and other browsers. It just won't open it on chromium anymore. It is generating certificate issues. Chromium is the engine that webview use. I downloaded Firefox Geckoview maven package inside the app and the oauth page loads successfully.


If you can try running the same url on webview (chromium) to reproduce the problem:

https://sandbox.dev.clover.com/oauth/authorize?client_id=NKH7ZDN1Z4CQJ&response_type=code






0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ bassel commented ·

Hmm, not sure what could be causing this. The OAuth flow does seem to run fine in Chromium outside of a webview. Did you recently update the webview version or make any other changes to your app? Does your app run on both Clover and non-Clover devices?

0 Likes 0 ·
bassel avatar image bassel David Marginian ♦♦ commented ·

I did not update anything, clover oauth web url suddenly started asking for client certificate on chromium webview on android versions below 6.0 and it is loading properly on versions 6 and above. My app was running fine on Clover devices. For nonClover devices it will run fine if the Android version is 6 or above.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community