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

fix: use browser router in http mode #1009

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rolznz
Copy link
Contributor

@rolznz rolznz commented Jan 17, 2025

Part of #328

The deeplink flow does not work well with a hash router, this will likely break for developers who try to implement it and inject query parameters to configure the new app connection.

We might need to update a few guides, etc. For now I added a redirect to ensure old links still work.

@@ -61,20 +61,24 @@ function AppCreatedInternal() {
}
// dispatch a success event which can be listened to by the opener or by the app that embedded the webview
// this gives those apps the chance to know the user has enabled the connection
const nwcEvent = new CustomEvent("nwc:success", { detail: {} });
const nwcEvent = new CustomEvent("nwc:success", {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we actually consume this custom event anywhere?

I know window.opener.postMessage is consumed by Alby JS SDK. Do we need both?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, maybe this one is for a native app (I need to test it)

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

Successfully merging this pull request may close these issues.

1 participant