SFAuthorizationPluginView Implementation in Swift

Hi,

I am currently trying to develop an authorization plugin using SFAuthorizationPluginView. My objective is to display a webView to the user for authentication purposes. I have based my work on the updated NameandPassword example : https://github.com/antoinebell/NameAndPassword.

I have seen that the header for the SFAuthorizationPluginView class exists in Swift. However, I have not found any implementation examples of an authorization plugin in Swift. I have attempted to implement this on my own but am encountering difficulties displaying my embedded view within a ViewController. Is it possible to create an authorization plug-in in Swift ?

Answered by DTS Engineer in 796439022

I’d like you to submit a code-level support request so that I can share some stuff with you. Once that’s done, we can continue the discussion here in the forums. When you create the request, indicate that you were referred by someone at Apple and make sure to include a link to this thread.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I’d like you to submit a code-level support request so that I can share some stuff with you. Once that’s done, we can continue the discussion here in the forums. When you create the request, indicate that you were referred by someone at Apple and make sure to include a link to this thread.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi,

I have reviewed and tested the provided examples, and I would need some additional information.

I would like to dynamically display elements (input fields, images, buttons) on the login and lock screens.

When using an NSWindow (GUIAuthPlugin), I encountered an issue with loading this custom UI on the lock screen, and I haven’t found any workaround to fix this problem. Is there one available?

When using the SFAuthorizationPluginView subclass (LoginUIView), I feel limited in terms of view size and element layout. Is it possible to hide the user photo and name so that the authorization plugin can handle displaying them? Also, is it possible to load a dynamically constructed view, for instance, using SwiftUI?

What would be the best approach for my case?

Thank you for your help.

SFAuthorizationPluginView Implementation in Swift
 
 
Q