The auth methods can be accessed via the supabase.auth
namespace.
public func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
if let url = launchOptions?[.url] as? URL {
supabase.auth.handle(url)
}
return true
}
func application(
_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey: Any]
) -> Bool {
supabase.auth.handle(url)
return true
}
#### UIKit app lifecycle with scenes
In your `SceneDelegate.swift`:
```swift
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
guard let url = URLContexts.first?.url else { return }
supabase.auth.handle(url)
}
In your AppDelegate.swift
:
SomeView()
.onOpenURL { url in
supabase.auth.handle(url)
}
let supabase = SupabaseClient(supabaseURL: URL(string: "https://xyzcompany.supabase.co")!, supabaseKey: "public-anon-key")
let auth = supabase.auth
let supabase = SupabaseClient(
supabaseURL: URL(string: "https://xyzcompany.supabase.co")!,
supabaseKey: "public-anon-key",
options: .init(
auth: .init(
MyCustomLocalStorage()
)
)
)
let auth = supabase.auth