iOS Development Login Registration system

Source: Internet
Author: User

First, the type of login:

1. Normal Login

2 . Login with stand-alone system

3 . Single Sign-on

4, Oauth2.0 login

Detailed descriptions are as follows:

1. Normal Login:

Ordinary login needs, is a login page, enter the account password, submit form form, back-end query database corresponding to the user name of the hash password, matching the correct user record to the session, incorrect return error.

Password hash: Is the password stored in the database is a string of ciphertext, cipher text is plaintext password through an irreversible algorithm.

The principle of session: In fact, relies on the cookie, through the cookie record user credentials.

2 . Login with Standalone system :

To avoid tokens being stolen, the website system is logged in indefinitely. After the user enters the account password, the Passport will be redirected to the callback processing address provided by the www.xxx.com with a reversible encrypted token containing the user's information, then decrypted, and the user is logged in correctly. Note that the encrypted information here needs to contain a timestamp, the receiver needs to authenticate the timestamp, and the expiration login fails.

3 . Single Sign-on:

Single Sign-on SSO, the need to implement the requirements is actually in site a login, then users can automatically at site B, Site C, site E, F, g login.

There are three ways to achieve this:

<1> ways to use cookies as a voucher medium

is to use cookies as a medium to store user credentials. After the user logs in to the parent app, the app returns an encrypted cookie that, when the user accesses the sub-app, carries this cookie, authorizes the app to decrypt the cookie and checks it, and checks to log in to the current user.

<2> through the Jsonp way

After the user logs in to the parent app, the cookie that matches the session is stored in the client, and when the user needs to log in to the sub-application, the authorization app accesses the JSONP interface provided by the parent app and takes the cookie under the parent app domain name in the request, the parent app receives the request, verifies the user's login status, Returns the encrypted information that the child application authenticates the user by parsing the encrypted information returned, and if authenticated, the user is logged on.

<3> How to redirect by Page

is to communicate through the parent app and the child app to redirect back and forth, to achieve the safe transfer of information. The parent app provides a get-way login interface that the user accesses through a sub-app redirection connection, and if the user is not logged in, returns a login page where the user enters the account password to log in. If the user is already logged in, an encrypted token is generated and redirected to the interface of the authentication token provided by the child app, after decryption and validation, the child application logs on to the current user.

4,OAuth2.0 login :

Now many apps use third-party logins, such as "" Login "," Weibo login "," "QQ login", in fact, the third party login is to achieve the OAUTH2.0 protocol, A third party provides a login entry, which is a login page under a third-party domain name. When the main station needs to log in, the user is redirected to a third-party login page, the user enters the account password, logs on to the third-party system, and the third-party system matches the account successfully, with a code to the master callback address, the master receives the code, A short period of time with code to request the third party to provide access to long-term credentials of the interface (because code has a relatively short expiration time), this long-term voucher is called access_token, after obtaining this Span class= "S5" >access_tokenaccess_token access_tokenrefresh_token because access_token There is an expiration time, once expired, the master can use Refresh_token Request the interface provided by the third party to obtain the new access_tokenrefresh_token

Second, several ways of login:

1, account (mobile phone number/email/username) + Password login

2, mobile phone number + Verification code login

3. third-party login

Third, the type of login process:

1, need to log in to continue to use the Product function services

2, do not need to first login can use the product or part of the product function

Four, the registration of several ways:

1. Email Registration

2, mobile phone number registration

3. Registration of User name

4. Third Party registration

V. Types of registration process:

1. complete the registration on the same page

2, Follow the steps to complete the registration of the page

Six, login, registration notes:

1, the mailbox/mobile phone number occupancy judgment

2, email/mobile phone number of the legality of Judgment

3 . login Password mechanism

4. If you need to confirm the password

5. do I need a verification code ?

6, Verification Code of the re-issued mechanism

7. exception Status during login registration

8, after Registration/login must be directly cut back to the process node that requires login

Seven, login, registration of the Hierarchical division:

1, the user level, the face of different target user groups, the corresponding login registration method is also different.

2, functional level, is to ensure that the entire login registration module logic rationality and flow of the patency.

3, business level, different business logic, the need for login registration method, process is also different; different function modules, the requirements for login nodes are also different.

4, the product level, different product types, the requirements for login registration module are different.

iOS Development Login Registration system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.