feat(02-05): wire iOS OIDC callback
- Register recipe URL scheme in Info.plist - Forward SwiftUI openURL callbacks to the AppAuth bridge
This commit is contained in:
@@ -4,5 +4,16 @@
|
||||
<dict>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>dev.ulfrx.recipe.auth</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>recipe</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -10,6 +10,12 @@ struct iOSApp: App {
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView()
|
||||
.onOpenURL { url in
|
||||
guard url.scheme == "recipe", url.host == "callback" else {
|
||||
return
|
||||
}
|
||||
_ = IosAppAuthBridge.shared.resumeExternalUserAgentFlow(urlString: url.absoluteString)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user