跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] 微信一键授权手机号登录,是不是会出现用户一直刷的问题

发表于

需求

第一次写微信小程序,今天搞了一个一键授权手机号登录;

但是我写完之后发现个问题;

我现在是通过微信最新的 api ,绑定一个 bindgetphonenumber="getPhoneNumber"。来获取手机号的 code ,

然后拿着 code + access_token ,换取手机号;

我拿到手机号,发给服务端,服务端判断是否有这个用户,存在 直接返回 Token ,不存在 异步注册 + 返回 token:

问题

但是他这个获取手机号的 api 是收费的,一次 0.03 元。 用户可以无限退出后,再认证; 这就导致一直调用;

这个怎么解,或者说 我的授权认证登录的逻辑有问题没

PS

我试了一下,其他平台的一键授权登录,都是可以一直退 一直授权; 大佬们都是怎么做的

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.