Tutorial on third-party application SSO authorization for access to Facebook, Google service, and Sina Weibo on the Android platform

Source: Internet
Author: User
Tags account security android sdk manager

 Tutorial on third-party application SSO authorization for access to Facebook, Google service, and Sina Weibo on the Android platform

-- Geolo (http://blog.csdn.net/GEOLO)

I. Introduction to SSO authorization

Third-party Android applications connected to Facebook, Google service, and Sina Weibo can quickly complete oauth2.0 authorization through corresponding official clients.

Ii. SSO authorization advantages

You do not need to enter the user name and password again. You only need to perform the operation step by clicking the authorization button to complete the authorization. This enhances the ease of operation and account security.

Iii. SSO authorization process example

1. Sina Weibo authorization process example

2. Google service authorization process instance

3. Facebook authorization process example


Iv. Sina Weibo access process

1. For more information, see the documentation in the SDK. csdn limits the number of words.

2. Code instance

After the authentication is successful, the token data is returned. If you change the token, the token is used to obtain the user's personal data and other data.

5. Facebook SSO access process

1. Start part can see (part content: http://www.cnblogs.com/tianjian/archive/2012/03/21/2410633.html)


2. Obtain users' personal data


Note: The user avatar address is fixed and the ID is obtained.

Vi. SSO access process of Google service

Google's access method is a key process taught in this article. Many problems may occur when Google API documentation is installed, And sSo cannot be successfully accessed, therefore, it takes a lot of time for the author to complete the access. I hope this tutorial will allow more students who need to access Google SSO to develop products more quickly.

1. Copy and import Google service to your eclipse

1.1 open your android SDK manager and download Goole play services

Csdn is getting worse and worse, and the editor is not easy to use. When publishing, the system prompts that the image failed to be saved. If you delete the number of words, the image cannot be displayed. You need to manually upload the image one by one... Not fast...

2. Code instance

3. After obtaining the Token, you need to obtain the user's personal data.

The following is an official website acquisition method, but it is outdated and has not been updated, so it misleads a large number of friends. Http://developer.android.com/training/id-auth/authenticate.html)

Note: Google has deprecated its secret account

VII. Tutorial Summary

SSO authentication solves the security of authentication to a large extent and enhances the user experience. The authentication can be successful with one click, without the need to enter the user name and password again. It brings a higher level of user experience to third-party applications. Finally, you must note that Sina Weibo must use version 3.0 or later to support SSO authentication.

 

Document: http://download.csdn.net/detail/geolo/5747475

Related Article

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.