Many websites have such a third-party login function. Click login to bring up a small window. after confirmation is made in the small window, it is immediately closed, let the post-master page Avatar be loaded ,.,, How is this implemented? Partial refresh involves ajax, but like...
Many websites have such a third-party login function. Click login to bring up a small window. after confirmation is made in the small window, it is immediately closed, let the post-master page Avatar be loaded ,.,, How is this implemented? Partial refreshing involves ajax, but the address in the small window in the figure is completely a third-party interface. how can I use ajax to control and return the information to the home page?
Reply content:
Many websites have such a third-party login function. Click login to bring up a small window. after confirmation is made in the small window, it is immediately closed, let the post-master page Avatar be loaded ,.,, How is this implemented? Partial refreshing involves ajax, but the address in the small window in the figure is completely a third-party interface. how can I use ajax to control and return the information to the home page?
The landlord can see the oauth login authorization, https://segmentfault.com/a/1190000005177874 landlord can study this code
Https://adodson.com/hello.js/
I tried to write user-authorized JavaScript code.
This is generally the case.
When a user triggers a logon, the program checks whether a logon token exists in the local storage. a window pops up or jumps to the logon page on our side. some information such as the application id and the callback address is displayed. after successful logon, it will jump to the address specified by the callback, usually the original logon page. at this time, it will jump to the new page with the token. At this time, you can use this token to access other APIs, such as user information and friends.
Http://www.uyan.cc/getcode, this kind of thing, it's good to have a third party.