ios – SwiftUI OAuth failing to redirect


I’m making an attempt to implement the callback from a redirect URI for OAuth in SwiftUI. I’m presently utilizing BetterSafariView from GitHub, and every part works positive till I enter my credentials in Safari, the place I am going to my redirect URI, nonetheless, the callback doesn’t work… I have to be lacking one thing right here.

readyPageBody()
        .webAuthenticationSession(isPresented: $startingWebAuthenticationSession)
    {
        WebAuthenticationSession(
            url: URL(string: 
            "URL&redirect_uri=https://stockorbit.app&response_type=code")!,
            callbackURLScheme: "stockorbit")
        {
            callbackURL, error in
            print("inside callback..")
            print(callbackURL, error)
        }.prefersEphemeralWebBrowserSession(false)


    }

Once I full the OAuth, I get redirected to StockOrbit.app, the place the code is within the URL. On the highest left, the cancel button is there, and by no means Finished. As well as, Safari would not shut out again to the app… What am I lacking right here?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles