Open rolznz opened 1 month ago
we miss this event then:
// notify the opener if present of the success full connect
window.addEventListener("load", (event) => {
// dispatch a success event which can be listened to by the opener or by the app that embeddes the webview
// this gives those apps the chance to know the user has enabled the connection
const nwcEvent = new CustomEvent("nwc:success", { detail: {} });
window.dispatchEvent(nwcEvent);
// notify the opener of the successful connection
if (window.opener) {
window.opener.postMessage(
{
type: "nwc:success",
payload: {success: true},
},
"*"
);
}
});
is this useEffect correct? https://github.com/getAlby/hub/blob/master/frontend/src/screens/apps/AppCreated.tsx#L76-L90
We need to design a new 1-click app connection flow that works in all environments
Try at https://paper-scissors-hodl.fly.dev/
On mobile this leaves the app connection completely broken - and copying the connection secret cannot work either because Alby Hub does not know it
Update: this cannot be fixed with nwc.getalby.com. We need to design a new 1-click app connection flow that works in all environments