Before the emergence of one-click login, the most common ways of APP registration and login in the market mainly include account password, SMS authentication and third-party login. These methods seem common and convenient, but in fact, there are many security risks and user experience is relatively poor. First of all, SMS verification code arrival rate is low, user operation is cumbersome and waiting time is long. If bugs are encountered, APP will face the disaster of uninstallation. In addition, SMS Trojan, pseudo base station and other problems have made the verification code become more insecure, greatly reduce the user experience.
However, “One-click Login” allows users to log in/register the APP with the local phone number. The mobile phone number is the user account, and the operator gateway can directly verify the mobile phone number without password and SMS authentication, which can easily solve the above problems. So, how can such a good function be realized? Today I will introduce aurora developer service product “Aurora Certification”.
Aurora authentication integrates the one-click login function of the three operators. Accessing one SDK of Aurora authentication enables users of three networks to log in the APP with one click, which has covered more than 99.9% of domestic users. The procedure for SDK integration on iOS is 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. Select the application for which you want to enable Aurora authentication, and click on the left of the Application Settings [The aurora certification“Button. Fill in the application description [Application of classification], [Application profile]. For iOS applications, fill in [Bundle ID], and click [Submit audit];
3. To enable the one-click login function, select the platform to enable one-click login from One-click Login Settings, enter the RSA encryption public key, and click Submit for Audit after Step 2.
4. After submission, we need to wait for the review. The review was very fast, and it was passed in about half an hour. For the first time, Aurora will give you more than 10,000 test items. Refer to the following steps to integrate the JVerification SDK. Portal: docs. Jiguang. Cn / / jverificat…
Manual integration steps
1. Please import the liBS folder from the SDK package in your own project
2. Add corresponding Frameworks for the project, the following Frameworks need to be added for the project:
- Adsupport. framework (required to obtain IDFA; Do not add IDFA if you do not use IDFA)
- CoreLocation.framework
- CFNetwork.framework
- CoreFoundation.framework
- libresolv.tbd
- libz.tbd
- libc++.1.tbd
- CoreTelephony.framework
- SystemConfiguration.framework
- Security.framework
- CoreGraphics.framework
- libsqlite3.tbd
- MobileCoreServices.framework
- Location: General “Linked Frameworks and libraries
3. The configuration – ObjC
Set project TARGETS -> Build Settings -> Other Links Flags and set -objc
4. Configure support for Http transfer. Right-click the project PList file and add the following code
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Copy the code
5. Please send the Demo JVerificationResource demonstration. Bundle to your project directory.
6. Add the one-click login function to the project
-
Configure bundleID under General Identity (see figure below)
-
Add the following code to the relevant classes that reference the jVerificationService.h header (see figure below)
// Import the jverificationService.h header file#import "JVERIFICATIONService.h"// If you need to use idFA function, you need to import the header file (optional)#import <AdSupport/AdSupport.h>Copy the code
-
The JVERIFICATIONService must be initialized before the JVerification SDK application is added. Otherwise, the JVERIFICATIONService will not work properly. Add the following code to the appropriate place (see figure below)
AdvertisingId NSString *idfaStr = [[[ASIdentifierManager sharedManager] = [[ASIdentifierManager sharedManager] = [[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString]; JVAuthConfig *config = [[JVAuthConfig alloc] init]; config.appKey = @"your appkey"; config.advertisingId = idfaStr; [JVERIFICATIONService setupWithConfig:config]; Copy the code
-
Follow the integration documentation to add codes such as one-click login:Docs. Jiguang. Cn/jverificati…The figure below is for reference only
-
Run the project log to print the registration result and login result, and return the corresponding UID and registrationID to indicate successful integration (refer to the following logs).
The 2019-08-09 11:10:32. 727188 + 0800 login (1240-285949) | JIGUANG | I - [JIGUANGService] -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- JVerification Log ---------------------------- --------------------JVerification SDK Version: 2.4.0 - build: 102 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- JCore Lib Version: 2.1.1 - build: 78 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -----------------AppKey:79d4c5ad142bba180ac12344----------------------- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - the 2019-08-09 11:10:32. 823700 + 0800 Login (1240-285952) | JIGUANG | I - [JIGUANGClientController] Action - the setup 11:10:32 2019-08-09. 847702 + 0800 Login (1240-285949) | JIGUANG | I - [JIGUANGConnectManager] Action - closeConection 11:10:32 2019-08-09. 965061 + 0800 login[1240:285949] | JIGUANG | I - [JIGUANGRegister] ----- register info ----- Appkey: 79d4c5ad142bba180ac18d2b token: advertisingIdentifier: E409D462 - ED53-4901-8 f60aa11 2019-08-09 11:10:34 cb1-73807. 058410 + 0800 login (1240-285949) | JIGUANG | I - [JIGUANGTcpEventController] ----- register result ----- uid: 29023815771 registrationID: 13165 ffa4e7673d8bd8 11:10:34 2019-08-09. 066755 + 0800 login (1240-285928) initialization results result: {code = 8000; content ="init success"; } the 2019-08-09 11:10:34. 107601 + 0800 login (1240-285949) | JIGUANG | I - [JIGUANGTcpEventController] -- -- -- -- -- login result -- -- -- -- -- uid: 29023815771 registrationID: 13165 ffa4e7673d8bd8 11:10:34 2019-08-09. 132452 + 0800 login (1240-285949) | JIGUANG | I - [JIGUANGIDFAReport] upload advertisingIdentifier E409D462-ED53-4901-8CB1-73807F60AA11 2019-08-09 11:10:35. 080778 + 0800 login (1240-285950) | JIGUANG | I - [JIGUANGTcpEventController] upload advertisingIdentifier success The 2019-08-09 11:10:36. 113310 + 0800 login (1240-285950) | JIGUANG | I - [JIGUANGConnectManager] Action - disConnect The 2019-08-09 11:10:36. 113575 + 0800 login (1240-285950) | JIGUANG | I - Action - closeConection [JIGUANGConnectManager]Copy the code
- After the integration is successful, click the interface (obtain Tonken, request authorization, prefetch number, login) corresponding to the buttons set above to experience one-click login
- If you don’t like the default login page, the aurora authentication SDK provides a custom page interface, can according to their own design draft to modify the UI document reference: docs. Jiguang. Cn/jverificati…
The above is iOS one key login SDK integration steps, practical operation down really convenient! Developers who want to improve user experience and product security can use it.