Oauth 谷歌认证总是要求授权

Oauth 谷歌认证总是要求授权,oauth,google-api,google-oauth,Oauth,Google Api,Google Oauth,在从Google OAuth连接用户后,当该用户希望在需要选择其Google帐户的下一个会话期间重新连接时,将再次请求许可 根据,负责授权请求的参数提示符的行为如下: 如果未指定值且用户之前未授权 访问,然后用户将显示一个同意屏幕 因此,用户不必重新排序其同意 设想的唯一答案是关于这个问题的答案: 因为我也在没有安全HTTP的情况下在本地工作,但他假设存在cookie策略,但事实并非如此 如何解决此异常 编辑: /** * Create a new OAuth2Client with the

在从Google OAuth连接用户后,当该用户希望在需要选择其Google帐户的下一个会话期间重新连接时,将再次请求许可

根据,负责授权请求的参数提示符的行为如下:

如果未指定值且用户之前未授权 访问,然后用户将显示一个同意屏幕

因此,用户不必重新排序其同意

设想的唯一答案是关于这个问题的答案:

因为我也在没有安全HTTP的情况下在本地工作,但他假设存在cookie策略,但事实并非如此

如何解决此异常

编辑:

/**
 * Create a new OAuth2Client with the credentials previously loads
 */
private getOAuth2() : OAuth2Client {
    return new OAuth2(
        this.credentials.client_secret,
        this.credentials.client_id,
        this.credentials.redirect_uris[0]
    );
}

/**
 * Create connection URL for the given scopes
 * @param scopes
 */
public url(scopes: Array<string>) : string {
    return this.client.generateAuthUrl({
            access_type: "offline",
            scope: scopes
    });
}



// The scope used to generate URL is 'https://www.googleapis.com/auth/youtube.readonly'

// this.client refer to a client which is load by getOAuth2
// and use only for the generation of URL's.
/**
*使用以前加载的凭据创建新的OAuth2Client
*/
私有getOAuth2():OAuth2Client{
返回新OAuth2(
此.credentials.client\u密码,
this.credentials.client_id,
此.credentials.redirect\u URI[0]
);
}
/**
*为给定作用域创建连接URL
*@param作用域
*/
公共url(作用域:数组):字符串{
返回this.client.generateAuthUrl({
访问类型:“脱机”,
范围:范围
});
}
//用于生成URL的作用域为'https://www.googleapis.com/auth/youtube.readonly'
//this.client是指由getOAuth2加载的客户端
//并且仅用于生成URL。

请编辑您的问题,并包括您用于验证的代码。这些信息不足以发现代码中的问题。唯一能影响的不是URL的生成吗?