向 google auth 请求添加随机数使用 NestJS

问题描述

我在 nestJS 中找不到任何关于向 google auth 策略添加随机数的文档。

在谷歌 documentation 中,我看到 nonce 是可以发送的参数。

我找不到关于此的任何其他文档。要么在 Passport 的 nestJS 上。

我认为它可以发送到这里。有没有人对如何发送无任何建议或答案?

export class GoogleStrategy extends PassportStrategy(Strategy,"google") {
  constructor(private readonly authService: AuthService) {
    super({
      clientID: process.env.CLIENT_ID,clientSecret: process.env.CLIENT_SECRET,callbackURL: `${process.env.AUTH_REDIRECT_SERVER}auth/google/callback`,passReqToCallback: true,scope: ["profile","email"],});
  }

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)