gladly-team / next-firebase-auth

Simple Firebase authentication for all Next.js rendering strategies
https://nfa-example-git-v1x-gladly-team.vercel.app/
MIT License
1.34k stars 290 forks source link

NextJS api login getting spammed #715

Closed kerubkim closed 4 months ago

kerubkim commented 4 months ago

When filing a bug report, please confirm you've done the following:

  1. Have you set onVerifyTokenError and onTokenRefreshError in your config and checked for any helpful errors? Yes
  2. Have you set debug: true in your config and read through server-side and client-side debug logs for any helpful messages? Yes
  3. Have you tried the example app with your own Firebase credentials?
  4. Have you read through the troubleshooting Q&A? Yes

Describe the bug A clear and concise description of the bug.

As mentioned in the title /api/login is being requested at every refresh or redirect of page. Is this normal behavior?

Versions

next-firebase-auth version: ^1.0.2 Firebase JS SDK (firebase): ^10.7.2 Firebase admin SDK (firebase-admin): ^12.0.0 Next.js: 13.5.6

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Debug and error logs Please provide debug logs or errors from onVerifyTokenError and onTokenRefreshError.

Additional context Add any other context about the problem here.

kerubkim commented 4 months ago

Also seems, just by casually viewing scrolling at a page seems to make requests to the endpoint. I've added a screenshot.

Screenshot 2024-06-07 at 10 10 59 AM
kmjennison commented 4 months ago

Thanks! I believe this is a duplicate of #424, but let me know if it differs.