OAuth2 icon indicating copy to clipboard operation
OAuth2 copied to clipboard

Avoid using SafariViewController when token expires

Open mmoosbac94 opened this issue 1 year ago • 4 comments

Hello everybody,

we currently have the issue that we have to avoid the use of safari services. Our goal is to use the os standard browser for authentication. Its working when we first authorize via "oauth2.authorize()". But if the token expires, the SafarViewController is shown for new authentication. Is there a way to not use the SafariViewController and use the os standard browser instead for a new authentication as well?

Thank you

mmoosbac94 avatar Mar 22 '24 10:03 mmoosbac94

Even if authorizeEmbedded is set to false?

ossus-lib avatar Mar 23 '24 20:03 ossus-lib

Yes, and when we start the app its working. The standard default browser will be opened. But if the token expires and there is no refresh token and I am in app, then the Safari Viewcontroller is shown instead of the browser. We already tried different advanced settings from documentation but without success.

mmoosbac94 avatar Mar 24 '24 07:03 mmoosbac94

Can you reproduce with a debug logger and paste the logs here?

oauth2.logger = OAuth2DebugLogger(.trace)

ossus-lib avatar Mar 24 '24 14:03 ossus-lib

We tried to get some logs, but the authorization function is not called again when token expires. So when token expires there are no visible p2/oauth2 specific logs. We are using a so called ArcGIS SDK. We are not sure if this SDK is responsible for showing the SafariViewController.

mmoosbac94 avatar Mar 27 '24 09:03 mmoosbac94