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
        .withOptions {
        .withStyle {
        .onSignUp(callback: { (email, attributes) in

Hey there @ilikeprivacy!

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


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.

1 Like

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

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.