0

How can I change tintColor and barTintColor on the SafariVC that is presented when using SFAuthenticationSession ?

I tried to change UINavigationBar and UIToolBar and UIBarButtonItem appearance but it doesn't respect them.

Thanks

Oleg Sherman
  • 2,772
  • 1
  • 21
  • 20

1 Answers1

0

Changing tintColor and barTintColor of the Safari view controller used in SFAuthenticationSession isn't supported in the API.

I think the logic is that your OAuth authentication should be a separate process from your app's and that should be obvious to the user (from the docs):

If an application uses SFAuthenticationSession, users are prompted by a dialog to give explicit consent, allowing the application to access the website's data in Safari. When the webpage is presented, it runs in a separate process, so the user and web service are guaranteed that the app has no way to gain access to the user’s credentials. Instead, the app gets a unique authentication token.

P.S. SFAuthenticationSession has been deprecated in iOS 12 in favor of ASWebAuthenticationSession. The API's are very similar though, so not much help for customization.

robotsquidward
  • 163
  • 2
  • 16