At one point in my app, I need to refresh the access token to reflect changes that have happened to the account. On iOS, the system dialog is displayed:
"myApp" Wants to Use "mySite.com" to Sign In
This allows the app and website to share information about you.
Cancel / Continue
Tapping on Continue
shows the Auth0 login screen briefly, and then it silently logs in without user interaction. Is there a way to refresh the access token without showing this system dialog?
This is how I am refreshing the access token:
static func attemptAuthentication() {
let params = someParametersForAnalytics()
Auth0
.webAuth(bundle: bundler)
.scope("openid profile email offline_access")
.audience("mySite")
.parameters(Dictionary(uniqueKeysWithValues: params))
.start {
switch $0 {
case .failure(let error):
authenticationFailed(error:error)
case .success(let credentials):
authenticationSucceeded(credentials: credentials, manually: true)
}
}
}