I haven't looked into the why so I can only guess a reason based on my experience.
My experience is this: I created an LNC connection string that only has permission to create invoices and read info from my node.
Then I published that LNC connection string on one of my test stores -- my "Alice" store.
Then I pretended to be a customer -- "Bob" -- and I used the LNC connection string to connect to Alice's node and load an invoice. It all worked as expected so far: I saw a nice, shiny invoice and I could display it as a qr code for Bob to pay.
Then, while Bob was still viewing that invoice, I pretended to be a second customer -- "Carol" -- and I tried to do the same thing Bob did: I tried to use the LNC connection string to connect to Alice's node and load an invoice. But it did not work. I got an error that said something like "the connection is already in use."
My guess is that the LNC devs were very motivated to ensure that each LNC connection string is only used for one service. I think they don't want two devices to both have access to the same node via the same connection string -- they want some sort of "separation of strings," so that you give a new string to every service.
My guess is this: to help ensure that users do not share a string between two devices, they handicapped the strings so that they cannot establish two simultaneous open connections. Consequently if Bob is using it, Carol cannot.
Therefore, if I used LNC, Bob could effectively bring down a store's lightning capability by using up its only available connection. He could just get an invoice and constantly keep a connection open to check its status, without ever intending to pay. I don't want that so I don't want to use LNC.
Super, can you specify exactly what is happening? I tried to reproduce your issue but couldn't.
I have one node, and generated 3 LNC pairing phrases. I put one pairing phrase in Zeus on my android phone. I put a different one in Zeus on my graphene phone. And I put a different one in terminal web.
I generated an invoice on each service, 3000,4000,5000 and it all generated fine.
reply
He wants the same pairing phrase to be used by N devices simultaneously.
His use case is a website store owner allowing many customers to request invoices from the store owner's node using the same pairing phrase.
reply
Okay got it. Makes more sense now. I just tested it myself and I generated an invoice that expires in 5 minutes on my Zeus connected via LNC. Closed the app, then opened again and generated a different invoice with an expiry of 4 minutes with no issue.
reply
Just tested with alby and terminal web. I generated multiple invoices in quick succession using the same LNC pairing phrase with expires of 1 day.
reply
I believe you'd recreate the issue by creating multiple concurrent LNC connections with the same pairing phrase. You created multiple serially.
reply
I can't imagine a scenario where I would want to do that. Why can't Bob/Carol just pay Alice by triggering an invoice through Alice's store? There is no scenario where Bob or Carol would need to connect to Alice's store.
reply
through Alice's store
If Alice's store doesn't have a server to generate an invoice, there's nothing to go "through."
The magic of magic webstore is that Alice isn't hosting the store. Magic webstore is a statically served html file that pulls store-specific data from nostr and which store you're viewing is specified in http GET params.
LNC connections need to happen client side or Alice would need to run yet-another-service.
reply
Seems like Alby would be the best way to go about it then. LNC requires a client/server relationship. Alby is a pretty nice go between for services and nodes(via LNC) though.
reply
Adding a form to connect to Alby (and, through Alby, maybe even to your own node) is a good idea. Nonetheless, I would still like to reduce the number of dependencies by supporting a connection string directly to your own node.
So Alice would sign up for Alby with their LNC pair phrase and Bob and Carol would request invoices through Alby?