简体   繁体   中英

SFAuthenticationSession appearance

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

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM