The one page example isn’t a very production ready example.
Normally what you would probably do is setup along the lives of
- a service/website to manage key fetching/authentication and renewal
- a pubsub service to fetch and use those keys and relay events to whatever