nodeJs:如何禁用 google 帐户选择器并仅传递一个邮件 ID
nodeJs: how to disable google account chooser and pass only one mail id
这 link 重定向到帐户选择器,但我不想选择任何一个帐户。在 nodejs 中我需要禁用帐户选择器,是否可以在 nodejs 中禁用并在 url 本身中传递电子邮件但不重定向到帐户选择器。 (默认情况下,我想发送任何一个 id(example@gmail.com) 以及 url)
此 URL 用于使用该代码值生成 'code' 值,指定用户的访问令牌将被获取。我通过系统地获取代码并继续获取访问令牌来做到这一点。每次我生成 URL 时,它都会将我重定向到帐户选择器。相反,我想发送我的电子邮件 ID 和 URL,这样我就不需要手动 select 帐户来获取代码并继续它。
URL: https://accounts.google.com/o/oauth2/auth?access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.me%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.login%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.profiles.read%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.activity.read%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.body.read%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.body.write&response_type=code&client_id=********************************&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Fgoogle%2Freturn
Try this:
login_hint=emailid
URL + &login_hint=emailid. It will work fine
URL: https://accounts.google.com/o/oauth2/auth?access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.me%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.login%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.profiles.read%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.activity.read%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.body.read%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.body.write&response_type=code&client_id=********************************&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Fgoogle%2Freturn
这 link 重定向到帐户选择器,但我不想选择任何一个帐户。在 nodejs 中我需要禁用帐户选择器,是否可以在 nodejs 中禁用并在 url 本身中传递电子邮件但不重定向到帐户选择器。 (默认情况下,我想发送任何一个 id(example@gmail.com) 以及 url)
此 URL 用于使用该代码值生成 'code' 值,指定用户的访问令牌将被获取。我通过系统地获取代码并继续获取访问令牌来做到这一点。每次我生成 URL 时,它都会将我重定向到帐户选择器。相反,我想发送我的电子邮件 ID 和 URL,这样我就不需要手动 select 帐户来获取代码并继续它。
URL: https://accounts.google.com/o/oauth2/auth?access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.me%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.login%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.profiles.read%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.activity.read%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.body.read%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.body.write&response_type=code&client_id=********************************&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Fgoogle%2Freturn
Try this:
login_hint=emailid
URL + &login_hint=emailid. It will work fine
URL: https://accounts.google.com/o/oauth2/auth?access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.me%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.login%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.profiles.read%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.activity.read%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.body.read%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffitness.body.write&response_type=code&client_id=********************************&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Fgoogle%2Freturn