HomeiOS Developmentios - SwiftUI OAuth failing to redirect

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 at present utilizing BetterSafariView from GitHub, and every thing works advantageous till I enter my credentials in Safari, the place I’m going to my redirect URI, nonetheless, the callback doesn’t work… I should 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)


    }

After 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

Most Popular

Recent Comments