To implement the one-click login and registration features, refer to the demo and sample in this article.
Android client
For instructions on setting up the environment and downloading the SDK for the Android client, see Android Client Integration.
Demo and sample
-
Click Login/Register.
-
Click One-click Login. The login screen automatically detects and displays the current phone number with the middle four digits masked. The screen also indicates Authentication service provided by China Mobile and includes the One-click Login button.
-
After successful phone number authentication, the system returns a verify token. Use this token for phone number retrieval to complete the process.
-
If phone number authentication fails, click Log in with another phone number to use SMS authentication.
-
Enter your phone number, accept the user agreement, and request a verification code.
-
Enter the verification code. Verifying the token completes the process.
-
iOS client
For instructions on setting up the environment and downloading the SDK for the iOS client, see iOS Client Integration.
Demo and sample
-
From the bottom navigation bar, go to the Me page and click Login/Register. This option is displayed if you are not already logged in.
-
Click One-click Login to obtain a token and use it to retrieve the phone number. On the login page, the recognized phone number of your device is displayed. Click One-click Login to complete the phone number authentication.
-
If the login is successful, the process is complete.
-
If phone number authentication fails, click Log in with another phone number to use SMS authentication.
-
Enter your phone number, accept the user agreement, and request a verification code.
-
Enter the verification code. The process is complete after the code is verified.
-