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 '' (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

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