How-to use existing private key with Helia?

Using this private key technic
I would like to make a “login.html” taking key file from /ipns/IPNSPUB/ipns.priv

Anyone has ever done it using Helia ?
Thanks for your help

I haven’t created a login, but we generate deterministic addresses for our relays using a pre-defined private key. Providing our implementation in case it helps. https://github.com/orbitdb/orbitdb/blob/6d82ad2b31673085974a2bad0bb38397bc0275ac/test/utils/relay.js#L13

Thanks for the link.
But it is presented in a “node.js style”, would it be possible to do the same from a single index.html page?