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.

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?