Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attestastion-Connect. OTP form opens again after signing Alpha wallet in Attestation on mobile #6819

Open
oa-s opened this issue May 16, 2023 · 4 comments
Assignees

Comments

@oa-s
Copy link
Contributor

oa-s commented May 16, 2023

Link https://smarttokenlabs.atlassian.net/browse/TKS-602

@oa-s oa-s self-assigned this May 16, 2023
@oa-s
Copy link
Contributor Author

oa-s commented May 16, 2023

@hboon it looks like we need to add pases handling here, replaced existing code

func webView(_ webView: WKWebView, createWebViewWith configuration: WKWebViewConfiguration, for navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures) -> WKWebView? {
        if navigationAction.targetFrame == nil {
            browserViewController.webView.load(navigationAction.request)
        }
        return nil
    }

with such code, popups displaying in same way as in Safary

func webView(_ webView: WKWebView,
                 createWebViewWith configuration: WKWebViewConfiguration,
                 for navigationAction: WKNavigationAction,
                 windowFeatures: WKWindowFeatures) -> WKWebView? {

//        if navigationAction.targetFrame == nil {
//            browserViewController.webView.load(navigationAction.request)
//            return nil
//        } else {
            let view = browserViewController.view!

            let popupWebView = WKWebView(frame: view.bounds, configuration: configuration)

            popupWebView.navigationDelegate = self
            popupWebView.uiDelegate = self
            popupWebView.configuration.preferences.javaScriptCanOpenWindowsAutomatically = true
            popupWebView.configuration.preferences.javaScriptEnabled = true

            view.addSubview(popupWebView)

            NSLayoutConstraint.activate([
                popupWebView.widthAnchor.constraint(equalTo: view.widthAnchor),
                popupWebView.heightAnchor.constraint(equalTo: view.heightAnchor),

                popupWebView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
                popupWebView.centerYAnchor.constraint(equalTo: view.centerYAnchor)
            ])

            self.popupWebView = popupWebView

            return popupWebView
//        }
    }

to handle all created web views we would need to make pages, with opening a new page for browser.

any ideas?

@hboon
Copy link
Member

hboon commented May 16, 2023

Hmm. That means having to handle open windows, and all the window management support, right? Let’s see if it’s possible that they run without pop ups? I think there’s a redirect mode.

@oa-s
Copy link
Contributor Author

oa-s commented May 17, 2023

haven't find any tips to solve this, tabs handling could bring additional work and bugs

@hboon
Copy link
Member

hboon commented May 17, 2023

We don’t have to fix it by adding pop up support. Just let them know we don’t. But is the reloading an issue? Why is it doing that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants