我正试图通过使用OAuth2登录谷歌时传递一些状态。我创建了我的网址:
oauth2Client.generateAuthUrl({
access_type: "offline",
scope: "email",
state: {
whatever: 'stupid'
}
});
当我点击我的回调代码
router.get("/callback", async (req, res) => {
console.log(req.params)
...
});
我的状态没有附在网址上,我无法在参数中看到它。我能错过什么才能访问这个状态?