Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

微信可以增加网站应用的授权么 #271

Open
Singrun opened this issue Jan 24, 2024 · 4 comments
Open

微信可以增加网站应用的授权么 #271

Singrun opened this issue Jan 24, 2024 · 4 comments

Comments

@Singrun
Copy link

Singrun commented Jan 24, 2024

目前好像是针对公众号,网站应用无法构建正确的接口地址

@season886
Copy link

@overtrue
Copy link
Owner

@season886
Copy link

@overtrue 大佬,新年快乐,过完年能否加上企业微信WEB登录URL生成,目前只能生成手机端登录的URL

@Singrun
Copy link
Author

Singrun commented Jan 27, 2024

wework 中

public function getAuthUrl(): string
{
// 网页授权登录
if (empty($this->agentId)) {
$queries = [
'appid' => $this->getClientId(),
'redirect_uri' => $this->redirectUrl,
'response_type' => 'code',
'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator),
'state' => $this->state,
];

        return sprintf('https://open.weixin.qq.com/connect/oauth2/authorize?%s#wechat_redirect', http_build_query($queries));
    }

    // 第三方网页应用登录(扫码登录)
    return $this->getQrConnectUrl();
}

但是网站应用扫码登录的构造网址是:https://open.weixin.qq.com/connect/qrconnect?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect,这个网址构造的开头是不同的。能够增加相应的分类。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants