google+ login - a primer
TRANSCRIPT
![Page 1: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/1.jpg)
▸ Lecture will begin shortly
Google+ Login - A Primer
![Page 2: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/2.jpg)
❖ Overview ❖ How Does OAuth 2.0 Work? ❖ Setting up Project ❖ Google Play Services
Topics
![Page 3: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/3.jpg)
Overview❖ Sharing passwords ❖ No cross-federated authentication ❖ Everybody had their own username/
password
![Page 4: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/4.jpg)
![Page 5: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/5.jpg)
![Page 6: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/6.jpg)
❖ Provides authentication flows for web, desktop, and mobile.
❖ User authentication is delegate to an HTTP services such as Google.
❖ Relies on informed user consent and tokens
OAuth 2.0 to the Rescue
![Page 7: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/7.jpg)
User Login & Consent
Request Token
Mobile App
Authorization Code
Call Google API with Token
Access TokenRefresh Token
Exchange Code for Token
![Page 8: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/8.jpg)
Google has their own OAuth 2Using Google Play Services
![Page 9: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/9.jpg)
❖ Nobody wants to create “Yet Another Login”
❖ Hides a lot of the OAuth 2.0 details ❖ Provides a standard, native experience ❖ Authentication is a Hard Thing
❖ In other words, we’re lazy…
Why Use Google+ Login?
![Page 10: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/10.jpg)
Creating an API Projecthttps://console.developers.google.com/project
![Page 11: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/11.jpg)
SHA1 Fingerprint
![Page 12: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/12.jpg)
Create a Google API Project
![Page 13: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/13.jpg)
Enable the Google+ API
![Page 14: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/14.jpg)
Create Client ID
![Page 15: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/15.jpg)
Now For the CodeAdding Google+ Authentication to a Xamarin.Android App.
![Page 16: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/16.jpg)
① Add Google Play Services to the Android Project ② Update Android Permissions ③ Add Google+ Sign-in Button to UI ④ Initialize a GoogleApiClient ⑤ Respond to callbacks from the GoogleApiClient
Checklist
![Page 17: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/17.jpg)
Show Me The Code!
![Page 18: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/18.jpg)
❖ Source Codehttps://github.com/topgenorth/gplus-quickstart-xamarin.android
❖ Google Developer Consolehttps://console.developers.google.com/
❖ Start integrating Google+ into your Android app https://developers.google.com/+/mobile/android/getting-started
❖ Google+ Sign-in for Android https://developers.google.com/+/mobile/android/sign-in
❖ Google+ Platform Developer Policies https://developers.google.com/+/policies
References
![Page 19: Google+ Login - A Primer](https://reader037.vdocuments.net/reader037/viewer/2022103018/55a6c03d1a28ab41688b47c9/html5/thumbnails/19.jpg)
❖ OAuth2 Crash Course ❖ Creating the Google API Project ❖ Examined Working Code
Summary