Anyone integrated lock widget into swiftui?

is it even workable? I can get a viewController with code below. And wrap it into the representable as required by SwiftUI, but i don’t see any delegates that I can use to pass around so I could get callbacks.

Also not sure if just getting viewController directly is ok, I noticed that “present” method has some more logic in it than just returning viewController.

let vc = Lock
        .classic()
        .withOptions {
        }
        .withStyle {
        }
        .onSignUp(callback: { (email, attributes) in
        }).viewController

Hey there @ilikeprivacy!

As of now we don’t have any official content on integrating Auth0 stack with SwiftUI.

Hi,

Take a look at the pod I created here.
Based on a previous conversation I created a

  • view that presents the Lock ui in a wrapper
  • takes as a parameter a SessionPublisher to remove the need of delegation.

The pod example shows how to integrate it. The logic is pretty much the one you started out with, using the .viewController.

Thanks for sharing that with other users @kerekes.j.marton!