Insert login snippet into worker

Hi there!
I’m pretty new into Cloudfare and programming as well, so please apologize me if I’m asking something that doesn’t make sense.
I’ve set up a working worker that calls an URL that hosts a notion page.
The thing is that I want to limit the access to that URL with a user/password filter.
Could you please point me out to some info or tutorial in which I can comprehend how to build that piece of code?

Thanks in advance.