When using iOS13+ and SwiftUI, the callback will not be called if it's in the AppDelgate. You must move it to the SceneDelgate. This callback works there:
func scene(_ scene: UIScene, openURLContexts URLContexts: Set) {
print("In callback")
for urlContext in URLContexts {
let url = urlContext.url
oauth2.handleRedirectURL(url)
}
// URL not auth related, developer should handle it.
}
When using iOS13+ and SwiftUI, the callback will not be called if it's in the AppDelgate. You must move it to the SceneDelgate. This callback works there:
func scene(_ scene: UIScene, openURLContexts URLContexts: Set) {
print("In callback")
for urlContext in URLContexts {
let url = urlContext.url
oauth2.handleRedirectURL(url)
}
// URL not auth related, developer should handle it.
}
This should be added to the docs