Micro-channel public number, a phone authorization page login feature

Prerequisites

The phone has been bound through the micro-channel public number, there has been no mapping for the user's openId

Scenes:

Binding of a number of public orders system, pc web page you want to display in the operation, the order is required to obtain permission (binding through the public number in order to use and display)

achieve:

1, two pages, one in the phone display authorization page, a page displays a two-dimensional code pages (after scanning the two-dimensional code, the phone side display authorization page)

2, two-dimensional code page, call the backend interface to your phone authorization page url as a parameter and returns a two-dimensional code images (generated from the micro-channel back-end configuration, containing unique identification url incoming information and two-dimensional code, code ) and that uniquely identifies the two-dimensional code , the back-end interface to provide a second acquisition state, the unique identification code of the two-dimensional anti-pass back , 5 seconds to call once, determine whether the current authorization after every login, if the or two-dimensional code that uniquely identifies whether a failure has

3, authorization page, the phone micro-channel scan code display authorization page, the back-end interface to provide a third, passing the two-dimensional code and a unique identification code, the rear end of this openId unique identification number and a micro-channel public do mapping

4, when the two-dimensional code page for state again, the incoming unique identification has been mapped, then return a redirect ur, you can jump.

 

Guess you like

Origin www.cnblogs.com/panyujun/p/11287772.html