Facebook Callback appends '#_=_' to Return URL

前端 未结 23 1712
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 14:56

Facebook callback has started appending #_=_ hash underscore to the Return URL

Does anyone know why? What is the solution?

23条回答
  •  北海茫月
    2020-11-22 15:15

    I know this reply is late, but if you are using passportjs, you might want to see this.

    return (req, res, next) => {
        console.log(req.originalUrl);
        next();
    };
    

    I have written this middleware and applied it to express server instance, and the original URL I've got is without the "#_=_". Looks like it when we apply passporJS' instance as middleware to the server instance, it doesn't take those characters, but are only visible on the address bar of our browsers.

提交回复
热议问题