oneTap with localhost

I am getting error when testing with localhost
  1. I added http://localhost:3000 to Authorized JavaScript origins in google Credentials
  2. set Referrer-Policy header in next.config.ts
    async headers() {
    return await Promise.resolve([
      /*
       * Enhanced Security Headers
       * Adds Content Security Policy for better security
       */
      {
        source: '/(.*)',
        headers: [
          {
            key: 'X-Frame-Options',
            value: 'DENY',
          },
          {
            key: 'X-Content-Type-Options',
            value: 'nosniff',
          },
          {
            key: 'Referrer-Policy',
            value: 'origin-when-cross-origin',
          },
          {
            key: 'X-XSS-Protection',
            value: '1; mode=block',
          },
        ],
      },
    ]);
    },

    Errors in console
    ```
    [GSI_LOGGER]: Your client application uses one of the Google One Tap prompt UI status methods that may stop functioning when FedCM becomes mandatory. Refer to the migration guide to update your code accordingly and opt-in to FedCM to test your changes. Learn more: https://developers.google.com/identity/gsi/web/guides/fedcm-migration?s=dc#display_moment and https://developers.google.com/identity/gsi/web/guides/fedcm-migration?s=dc#skipped_moment
[GSI_LOGGER]: FedCM get() rejects with AbortError: signal is aborted without reason
```
image.png
Was this page helpful?