| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 |
Web OTP API
Android has automatic and one-tap SMS verification. We would like to cover the gap on web platform and implement the WebOTP Service API for web developers.
Web-exposed Interfaces
Web OTP API
This is implemented in third_party/blink/renderer/modules/credentialmanagement and exposes the following function:
navigator.credentials.get({otp: {transport: ["sms"]}})
Testing
- Unit tests are located in content/browser/sms/webotp_service_unittest.cc.
- Browser tests are located in content/browser/sms/sms_browsertest.cc.
- The Android related tests are located in chrome/android/javatests/src/org/chromium/chrome/browser/sms/.
- Web platform tests are located in third_party/blink/web_tests/http/tests/credentialmanagement/
For how to run these tests, refer to Chromium documentation Running tests locally, Android Test Instructions
For testing this API locally, refer to How to use the Web OTP API
Platform Support
Android
The Android implementation (this does not include Android WebView) is located in chrome/browser/ui/android/sms/, content/public/android/java/src/org/chromium/content/browser/sms/, and chrome/android/java/src/org/chromium/chrome/browser/sms/.
For architectural diagrams, refer to design doc.
Desktop
We plan to implement it in the near future.