19
Lecture will begin shortly Google+ Login - A Primer

Google+ Login - A Primer

Embed Size (px)

Citation preview

Page 1: Google+ Login - A Primer

▸ Lecture will begin shortly

Google+ Login - A Primer

Page 2: Google+ Login - A Primer

❖ Overview ❖ How Does OAuth 2.0 Work? ❖ Setting up Project ❖ Google Play Services

Topics

Page 3: Google+ Login - A Primer

Overview❖ Sharing passwords ❖ No cross-federated authentication ❖ Everybody had their own username/

password

Page 4: Google+ Login - A Primer
Page 5: Google+ Login - A Primer
Page 6: Google+ Login - A Primer

❖ 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

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

Google has their own OAuth 2Using Google Play Services

Page 9: Google+ Login - A Primer

❖ 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

Creating an API Projecthttps://console.developers.google.com/project

Page 11: Google+ Login - A Primer

SHA1 Fingerprint

Page 12: Google+ Login - A Primer

Create a Google API Project

Page 13: Google+ Login - A Primer

Enable the Google+ API

Page 14: Google+ Login - A Primer

Create Client ID

Page 15: Google+ Login - A Primer

Now For the CodeAdding Google+ Authentication to a Xamarin.Android App.

Page 16: Google+ Login - A Primer

① 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

Show Me The Code!

Page 18: Google+ Login - A Primer

❖ 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

❖ OAuth2 Crash Course ❖ Creating the Google API Project ❖ Examined Working Code

Summary