I had this trying to test on localhost.
localhost
You might need to run your local development server with HTTPS. For Next.js, it's next dev --experimental-https.
next dev --experimental-https