Git Product home page Git Product logo

Comments (6)

qianfeiqianlan avatar qianfeiqianlan commented on July 30, 2024

@liaochangjiang

from authing-js-sdk.

liaochangjiang avatar liaochangjiang commented on July 30, 2024

@qianfeiqianlan 这个接口应该是不需要返回值的,HttpClient 对 code 不为 200 的 response 做了统一的异常处理:https://github.com/Authing/authing.js/blob/master/src/lib/common/HttpClient.ts#L44

from authing-js-sdk.

qianfeiqianlan avatar qianfeiqianlan commented on July 30, 2024

@liaochangjiang 我参考了这个文档 使用手机验证码登录,但是当我调用SDK发送短信验证码的时候,得到的返回值是undefined,跟踪代码到了issue链接的那个地方,看到data的值是对的,但返回的是data.data
目前我这边的issue表现就是,调用了sendSmsCode,但是返回值为undefined,并没又得到 { code: 200, message: '发送成功' }

from authing-js-sdk.

liaochangjiang avatar liaochangjiang commented on July 30, 2024

@qianfeiqianlan 你给的这个文档是老版本 SDK 的(顺便好奇一下你是在哪找到这个文档的入口的呢),最新的文档在 发送短信验证码

新版 SDK 的异常处理方式做了更新,对于 code 不为 200 的请求做了抛错处理,开发者可以通过 try/catch 来判断操作是否成功,详情请见 错误处理方式

from authing-js-sdk.

qianfeiqianlan avatar qianfeiqianlan commented on July 30, 2024

@liaochangjiang 好的好的,我就是从官网找到的,然后用起来发现不太对劲🤣

from authing-js-sdk.

liaochangjiang avatar liaochangjiang commented on July 30, 2024

@qianfeiqianlan 好的 🤣 我们更新下官网的文档链接

from authing-js-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.