Recently, I have seen that many apps have the one-click login function of the local number. I feel that this function is of great help to the transformation of app registration and the improvement of user experience. I believe that it will become a mainstream authentication method in the future.

The main function of one-click login is to allow users to log in/register app with the local number. The mobile phone number is the user account. The carrier gateway directly verifies the mobile phone number without password or SMS authentication. This feature is a boon for users with advanced lazy cancer: login is fast and mom no longer has to worry about me forgetting my password!

In fact, the three major operators have their own interfaces to achieve, but one by one access is more troublesome and the threshold is relatively high. Because the company used aurora push for previous projects, you can realize the one-click login function after learning about aurora developer service product “Aurora Certification”.

Aurora authentication integrates the one-click login function of the three operators. Users of three networks can log in to the App with one click by accessing one SDK of polar optical authentication. With reference to the Aurora documentation, I wrote an Android demo to test this new validation approach. The detailed steps are as follows:

1. Register aurora developer account and do developer certification. If you have used aurora push before, this step can be directly omitted. If you haven’t used any of aurora’s other SDKS before you need to register your account, portal: www.jiguang.cn/identify.

2. After creating an application on the Aurora Developer platform, enter the application package name, application signature, and encryption public key on the authentication Settings page. (PS: After the application is created, there will be an AppKey, which will be used later in the integration.)

3. After submission, we need to wait for the review. The review was very fast, and it was passed in about half an hour. As it was my first application, Aurora sent me more than 10,000 tests, which was a conscience. Download the official SDK after passing the review. Portal: docs. Jiguang. Cn / / jverificat… .

4. Build the Android Studio development environment

A) Decompress the SDK folder, copy the files under the LIBS folder in the SDK to the LIBS folder in the project, and the RES file to the corresponding directory

B) Add the following configuration to modeule gradle configuration:

C) Configure AndroidManifest by referring to the aurora documentation

I. Add permissions

Ii. Register an activity for one-click login

Iii. Fill in aurora’s AppKey, which was obtained when you created the app earlier

5. Add the one-click login function to the project

A) Initialization method

B) Bind a little login function to the registration button

C) If you don’t like the default login page, aurora Authentication one-click Login SDK also provides the interface to customize the page, you can modify the UI according to your own design

6. After obtaining the one-click loginToken, submit it to the server, go to aurora to exchange for a mobile phone number, and then you can use this mobile phone number to login. If the phone number is not registered, the server automatically registers the account with the phone number.

The above picture shows what my integrated demo looks like when installed on a mobile phone. You can register/log in with one click using your local number.

These are the integration steps for the Android one-click login SDK. Now more and more apps are adding one-click login, which is a good idea for developers who want to improve user experience and product security.