Help with passport-facebook

I’m trying to use passport-facebook but gets this error on the browser console:

localhost/:1 Access to XMLHttpRequest at 'https://www.facebook.com/v3.2/dialog/oauth?response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3001%2Fuser%2Flogin%2Ffacebook%2Fcallback&client_id=175060613784107' (redirected from 'http://localhost:3000/user/login/facebook') 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.

I’ve tried everything I found online but couldn’t help
Here is my code


You will find the backend code for passport on Server > controllers > userRouter
And the frontend request is made on Src > components > Logbox

Hope someone could bother to help me
Thanks

I solved it . Had to replace the button tag by anchor tag :rofl: :rofl: