12-03-2020 19:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-03-2020 19:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello, I hope you can guide me in the right direction here since I've been pretty stuck. I am making a request from my react from end to my nodejs api and I am getting the following error. Any idea what's happening? Thanks!
Access to fetch at 'https://www.fitbit.com/oauth2/authorize?response_type=code&client_id=22C384&scope=activity%20heartra...' (redirected from 'http://localhost:5000/api/fitbit/authorize') from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
12-09-2020 16:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



12-09-2020 16:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @alvarodltlp,
Welcome to the forums!
Are you attempting to authorize other users other than yourself? Or are you using this authorization URL for yourself for testing purposes? The reason I ask is the redirect URI you're using is fine for testing purposes, but wont work in a production environment. Localhost is not a URL that is external to the internet world that the public can access. You'll need to provide a valid redirect URI to your application to redirect your users back to after they grant consent to your application.
I hope this helps. Let me know if you continue to encounter this error after changing your redirect URI.

01-28-2024 09:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-28-2024 09:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I am facing the same cors issue and hasn't figure it out how to solve this.

01-30-2024 13:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



01-30-2024 13:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@sajid Welcome to the forums!
Are you using localhost as your redirect url as well? Or are you using your IP address?

