18
Lecture will begin shortly Google+ Login - A Primer

Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

▸ Lecture will begin shortly

Google+ Login - A Primer

Page 2: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

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

Topics

Some  Image  Related  to  the  Technology  Goes  Here

Page 3: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

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

password

Page 4: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication
Page 5: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication
Page 6: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

❖ Provides authentication flows for web, desktop, and mobile.

❖ User authentication is delegate to an HTTP services such as Google.

❖ Release on informed user consent and tokens

OAuth 2.0 to the Rescue

Page 7: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

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 Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

Google Has their own OAuth 2Using Google Play Services

Page 9: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

❖ Authentication is a Hard Thing ❖ Nobody wants to create “Yet Another

Login” ❖ Hides a lot of the OAuth 2.0 details ❖ Provides a standard, native experience

❖ In other words, we’re lazy…

Why Use Google+ Login?

Page 10: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

Creating a Google API https://console.developers.google.com/project

Page 11: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

SHA1 Fingerprint

Page 12: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

Create a Google API Project

Page 13: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

Enable Google + APIs

Page 14: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

Create Client ID

Page 15: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

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

Page 16: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

① Add Google Play Services to the Android Project ② Update Android Permissions ③ Add Google+ Sign-in Button to UI ④ Initialize a GoogleApiClient ⑤ Make API calls

Checklist

Page 17: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

Show Me The Code!

Page 18: Google+ Login - A Primerxamarinuniversity.blob.core.windows.net/guestlectures/Go... · 2015. 2. 17. · Provides authentication flows for web, desktop, and mobile. User authentication

Summary