App调用微信登录,AppSecret放哪?

小游戏 企业微信 微信支付 小程序 文章 2020-07-30 21:21 967 0 全屏看文

AI助手支持GPT4.0

App调用微信登录,AppSecret放哪?

之前产品只有小程序,现在需要开发app,并接入微信登录,看了官方的文档, 所交互都是app和微信服务器之间的,没有自己的后端参与。

之前小程序开发时,小程序值提供一个code,所有交互都是后端和微信服务器。怎么app端是app直接和微信交互?

就连access_token也是app自己获取,这样不会造成多个设备上的access_token冲突吗?还是说app登录的access_token和小程序的access_token不一样只能在当前app上使用?

另外AppSecret放不会有安全问题吗?


In the past, there were only small programs in the product. Now we need to develop an app and log in via wechat. After reading the official documents, all the interactions are between the app and the wechat server, without the participation of its own back-end. Before the development of the applet, the applet value provides a code, and all interactions are back-end and wechat server. How can app interact with wechat directly on the app side? Even access_ The token is also obtained by the app itself, which will not cause access on multiple devices_ Does token conflict? Or access for app login_ Token and access of small program_ Different token can only be used on the current app? In addition, will there be no security problems with appsecret?

回答:

微喵网络:

通过后端调用接口

寻己:

token是根据你的微信返回的,AppSecret可以让后台返回

-EOF-

AI助手支持GPT4.0