SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
Smart Lock for Passwords
Somkiat Khitwongwattana
Android Developer@Nextzy & Android GDE & Contributor@Droidsans
Smart Lock for Passwords
Smart Lock
• Signed-in across devices
• For Android and Chrome
• Reduce the risk of forgotten
Smart Lock for Passwords
Credentials API
• Retrieve and save app login credentials
• Auth.CREDENTIALS_API
• Multiple user credentials supported
Smart Lock for Passwords
Credential Management Capability
• Username
• Name
• Password
• Profile Picture URL
• Account Type
Smart Lock for Passwords
Smart Lock Flow
• Auto sign-in
• Multiple credentials
• No credentials / Signed out
• App start • Signed in
Smart Lock for Passwords
Smart Lock Flow
Smart Lock for Passwords
No credentials / Signed out
Smart Lock for Passwords
Auto sign-in
Smart Lock for Passwords
Multiple credentials
Smart Lock for Passwords
Get Started
• Add Google Play Services dependency
compile  'com.google.android.gms:play-­‐services:7.8.0'
• Declare the version of Google Play services
<application>  
   ...  
   <meta-­‐data  android:name="com.google.android.gms.version"  
                         android:value="@integer/google_play_services_version"  />  
   ...  
</application>
Smart Lock for Passwords
Get Started
• Create an OAuth 2.0 client ID
• Open Google Developer Console
• Create project
Smart Lock for Passwords
Get Started
• Setup OAuth consent screen
Smart Lock for Passwords
Get Started
• Create client ID
Smart Lock for Passwords
Get Started• Setup client ID
Smart Lock for Passwords
Get Started
• Example client ID
478989446966-gdahdsjn77selo6f1rnab6e2pd1nq4f3.apps.googleusercontent.com
Smart Lock for Passwords
Let's Get Coding
GoogleApiClient  mCredentialsApiClient;  
...  
mCredentialsApiClient  =  new  GoogleApiClient.Builder(this)  
      .addConnectionCallbacks(this)  
      .enableAutoManage(this,  0,  this)  
      .addApi(Auth.CREDENTIALS_API)  
      .build();
Smart Lock for Passwords
Store Credentials
Credential  credential  =  new  Credential.Builder(username)  
      .setPassword(password)  
      .setAccountType(accountType)  
      .setName(name)  
      .setProfilePictureUri(url)  
      .build();
Smart Lock for Passwords
Store Credentials
Auth.CredentialsApi.save(mCredentialsApiClient,  credential)

                .setResultCallback(new  ResultCallback<Status>()  {  
        @Override  
        public  void  onResult(Status  status)  {  
                ...  
        }  
});
Smart Lock for Passwords
Store Credentials
int  REQUEST_CODE_SAVE  =  123;  
Status  status  =  result.getStatus();  
if(status.isSuccess())  {  
        ...  
}  else  {  
        if(status.hasResolution())  {  
                status.startResolutionForResult(this,  REQUEST_CODE_SAVE);  
        }  else  {  
                ...  
        }  
}
Smart Lock for Passwords
Store Credentials
Smart Lock for Passwords
Store Credentials
@Override  
public  void  onActivityResult(int  requestCode,  int  resultCode,  Intent  data)  {  
        ...  
        if  (requestCode  ==  REQUEST_CODE_SAVE)  {  
                if  (resultCode  ==  RESULT_OK)  {  
                        ...  
                }  else  {  
                        ...  
                }  
        }  
        ...  
}
Smart Lock for Passwords
Request Credentials
CredentialRequest  request  =  new  CredentialRequest.Builder()  
                .setSupportsPasswordLogin(true)  
                .build();
Smart Lock for Passwords
Request Credentials
Auth.CredentialsApi.request(mCredentialsApiClient,  request)  
                .setResultCallback(new  ResultCallback<CredentialRequestResult>()  {  
        @Override  
        public  void  onResult(CredentialRequestResult  credentialRequestResult)  {  
                ...  
        }  
});
Smart Lock for Passwords
Share Credentials with Apps and Sites
• Verify website's sign-in domain by using the Google Search Console
• Make an association to Play Developer Console
• Must be available through HTTPS
Smart Lock for Passwords
Share Credentials with Apps and Sites
Smart Lock for Passwords
Share Credentials with Apps and Sites
Smart Lock for Passwords
Reference
https://developers.google.com/identity/smartlock-passwords
https://www.youtube.com/watch?v=M3Udfu6qidk
Smart Lock for Passwords Documentation
Google Play Services 7.5 (100 Days of Google Dev)

Más contenido relacionado

La actualidad más candente

Single-Page-Application & REST security
Single-Page-Application & REST securitySingle-Page-Application & REST security
Single-Page-Application & REST security
Igor Bossenko
 
.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET Core
.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET Core.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET Core
.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET Core
NETFest
 

La actualidad más candente (20)

Stateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWTStateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWT
 
Securing RESTful APIs using OAuth 2 and OpenID Connect
Securing RESTful APIs using OAuth 2 and OpenID ConnectSecuring RESTful APIs using OAuth 2 and OpenID Connect
Securing RESTful APIs using OAuth 2 and OpenID Connect
 
Single-Page-Application & REST security
Single-Page-Application & REST securitySingle-Page-Application & REST security
Single-Page-Application & REST security
 
CIS14: OAuth and OpenID Connect in Action
CIS14: OAuth and OpenID Connect in ActionCIS14: OAuth and OpenID Connect in Action
CIS14: OAuth and OpenID Connect in Action
 
Oauth 2.0 security
Oauth 2.0 securityOauth 2.0 security
Oauth 2.0 security
 
Demystifying OAuth 2.0
Demystifying OAuth 2.0Demystifying OAuth 2.0
Demystifying OAuth 2.0
 
Modern Security with OAuth 2.0 and JWT and Spring by Dmitry Buzdin
Modern Security with OAuth 2.0 and JWT and Spring by Dmitry BuzdinModern Security with OAuth 2.0 and JWT and Spring by Dmitry Buzdin
Modern Security with OAuth 2.0 and JWT and Spring by Dmitry Buzdin
 
OAuth2 Protocol with Grails Spring Security
OAuth2 Protocol with Grails Spring SecurityOAuth2 Protocol with Grails Spring Security
OAuth2 Protocol with Grails Spring Security
 
Stateless authentication for microservices - GR8Conf 2015
Stateless authentication for microservices - GR8Conf 2015Stateless authentication for microservices - GR8Conf 2015
Stateless authentication for microservices - GR8Conf 2015
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring Security
 
Stateless authentication for microservices
Stateless authentication for microservicesStateless authentication for microservices
Stateless authentication for microservices
 
Securing your APIs with OAuth, OpenID, and OpenID Connect
Securing your APIs with OAuth, OpenID, and OpenID ConnectSecuring your APIs with OAuth, OpenID, and OpenID Connect
Securing your APIs with OAuth, OpenID, and OpenID Connect
 
OAuth2 & OpenID Connect
OAuth2 & OpenID ConnectOAuth2 & OpenID Connect
OAuth2 & OpenID Connect
 
JavaOne 2014 - Securing RESTful Resources with OAuth2
JavaOne 2014 - Securing RESTful Resources with OAuth2JavaOne 2014 - Securing RESTful Resources with OAuth2
JavaOne 2014 - Securing RESTful Resources with OAuth2
 
.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET Core
.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET Core.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET Core
.NET Fest 2017. Михаил Щербаков. Механизмы предотвращения атак в ASP.NET Core
 
CIS14: Working with OAuth and OpenID Connect
CIS14: Working with OAuth and OpenID ConnectCIS14: Working with OAuth and OpenID Connect
CIS14: Working with OAuth and OpenID Connect
 
Stateless authentication for microservices - Greach 2015
Stateless authentication for microservices - Greach 2015Stateless authentication for microservices - Greach 2015
Stateless authentication for microservices - Greach 2015
 
REST Service Authetication with TLS & JWTs
REST Service Authetication with TLS & JWTsREST Service Authetication with TLS & JWTs
REST Service Authetication with TLS & JWTs
 
Securing RESTful Payment APIs Using OAuth 2
Securing RESTful Payment APIs Using OAuth 2Securing RESTful Payment APIs Using OAuth 2
Securing RESTful Payment APIs Using OAuth 2
 
Aspnet 4 new features
Aspnet 4 new featuresAspnet 4 new features
Aspnet 4 new features
 

Destacado

Destacado (14)

Advance Android Layout Walkthrough
Advance Android Layout WalkthroughAdvance Android Layout Walkthrough
Advance Android Layout Walkthrough
 
Smart Lock Systems
Smart Lock SystemsSmart Lock Systems
Smart Lock Systems
 
Infinum Android Talks #03 - Android Design Best Practices - for Designers and...
Infinum Android Talks #03 - Android Design Best Practices - for Designers and...Infinum Android Talks #03 - Android Design Best Practices - for Designers and...
Infinum Android Talks #03 - Android Design Best Practices - for Designers and...
 
Chapter 10 - Views Part 2
Chapter 10 - Views Part 2Chapter 10 - Views Part 2
Chapter 10 - Views Part 2
 
What's new in Google Play Services @ I/O Rewind Bangkok
What's new in Google Play Services @ I/O Rewind BangkokWhat's new in Google Play Services @ I/O Rewind Bangkok
What's new in Google Play Services @ I/O Rewind Bangkok
 
Whats new in Android Development Tools @ I/O Rewind Bangkok
Whats new in Android Development Tools @ I/O Rewind BangkokWhats new in Android Development Tools @ I/O Rewind Bangkok
Whats new in Android Development Tools @ I/O Rewind Bangkok
 
Interface Design for Mobile Application
Interface Design for Mobile ApplicationInterface Design for Mobile Application
Interface Design for Mobile Application
 
Deep dive into android restoration - DroidCon Paris 2014
Deep dive into android restoration - DroidCon Paris 2014Deep dive into android restoration - DroidCon Paris 2014
Deep dive into android restoration - DroidCon Paris 2014
 
Advanced iOS
Advanced iOSAdvanced iOS
Advanced iOS
 
Smart door lock
Smart door lockSmart door lock
Smart door lock
 
Pokemon GO 101@Nextzy
Pokemon GO 101@NextzyPokemon GO 101@Nextzy
Pokemon GO 101@Nextzy
 
Introduction to Listview in Android
Introduction to Listview in AndroidIntroduction to Listview in Android
Introduction to Listview in Android
 
ListView and Custom ListView on Android Development [Thai]
ListView and Custom ListView on Android Development [Thai]ListView and Custom ListView on Android Development [Thai]
ListView and Custom ListView on Android Development [Thai]
 
Prenetics InsurTech Award Presentation
Prenetics InsurTech Award PresentationPrenetics InsurTech Award Presentation
Prenetics InsurTech Award Presentation
 

Similar a Smart Lock for Password @ Game DevFest Bangkok 2015

Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Xamarin
 
TechDays 2013 Jari Kallonen: What's New WebForms 4.5
TechDays 2013 Jari Kallonen: What's New WebForms 4.5TechDays 2013 Jari Kallonen: What's New WebForms 4.5
TechDays 2013 Jari Kallonen: What's New WebForms 4.5
Tieturi Oy
 
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL CertificatesHashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Nick Maludy
 

Similar a Smart Lock for Password @ Game DevFest Bangkok 2015 (20)

使用 Passkeys 打造無密碼驗證服務
使用 Passkeys 打造無密碼驗證服務使用 Passkeys 打造無密碼驗證服務
使用 Passkeys 打造無密碼驗證服務
 
STATE OF THE ART AUTHENTICATION MIT JAVA EE 8
STATE OF THE ART AUTHENTICATION MIT JAVA EE 8STATE OF THE ART AUTHENTICATION MIT JAVA EE 8
STATE OF THE ART AUTHENTICATION MIT JAVA EE 8
 
CIS14: Enterprise Identity APIs
CIS14: Enterprise Identity APIsCIS14: Enterprise Identity APIs
CIS14: Enterprise Identity APIs
 
State of the art authentication mit Java EE 8
State of the art authentication mit Java EE 8State of the art authentication mit Java EE 8
State of the art authentication mit Java EE 8
 
OAuth 2.0 – A standard is coming of age by Uwe Friedrichsen
OAuth 2.0 – A standard is coming of age by Uwe FriedrichsenOAuth 2.0 – A standard is coming of age by Uwe Friedrichsen
OAuth 2.0 – A standard is coming of age by Uwe Friedrichsen
 
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
 
How to implement authorization in your backend with AWS IAM
How to implement authorization in your backend with AWS IAMHow to implement authorization in your backend with AWS IAM
How to implement authorization in your backend with AWS IAM
 
Cross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-InCross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-In
 
Integrating OAuth and Social Login Into Wordpress
Integrating OAuth and Social Login Into WordpressIntegrating OAuth and Social Login Into Wordpress
Integrating OAuth and Social Login Into Wordpress
 
AuthN deep.dive—ASP.NET Authentication Internals.pdf
AuthN deep.dive—ASP.NET Authentication Internals.pdfAuthN deep.dive—ASP.NET Authentication Internals.pdf
AuthN deep.dive—ASP.NET Authentication Internals.pdf
 
PHPUnit Episode iv.iii: Return of the tests
PHPUnit Episode iv.iii: Return of the testsPHPUnit Episode iv.iii: Return of the tests
PHPUnit Episode iv.iii: Return of the tests
 
TechDays 2013 Jari Kallonen: What's New WebForms 4.5
TechDays 2013 Jari Kallonen: What's New WebForms 4.5TechDays 2013 Jari Kallonen: What's New WebForms 4.5
TechDays 2013 Jari Kallonen: What's New WebForms 4.5
 
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL CertificatesHashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
 
SharePoint Fest Chicago 2015 - Anatomy of configuring provider hosted add-in...
SharePoint Fest Chicago 2015  - Anatomy of configuring provider hosted add-in...SharePoint Fest Chicago 2015  - Anatomy of configuring provider hosted add-in...
SharePoint Fest Chicago 2015 - Anatomy of configuring provider hosted add-in...
 
Webauthn Tutorial
Webauthn TutorialWebauthn Tutorial
Webauthn Tutorial
 
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
 
OAuth 2 Presentation
OAuth 2 PresentationOAuth 2 Presentation
OAuth 2 Presentation
 
Securing your Pulsar Cluster with Vault_Chris Kellogg
Securing your Pulsar Cluster with Vault_Chris KelloggSecuring your Pulsar Cluster with Vault_Chris Kellogg
Securing your Pulsar Cluster with Vault_Chris Kellogg
 
Build a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIBuild a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UI
 
Build a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UIBuild a Web Authentication System with a Custom UI
Build a Web Authentication System with a Custom UI
 

Más de Somkiat Khitwongwattana

Más de Somkiat Khitwongwattana (12)

What's new in Android - Google I/O Extended Bangkok 2022
What's new in Android - Google I/O Extended Bangkok 2022What's new in Android - Google I/O Extended Bangkok 2022
What's new in Android - Google I/O Extended Bangkok 2022
 
Canvas API in Android
Canvas API in AndroidCanvas API in Android
Canvas API in Android
 
Get Ready for Target SDK Version 29 and 30
Get Ready for Target SDK Version 29 and 30Get Ready for Target SDK Version 29 and 30
Get Ready for Target SDK Version 29 and 30
 
What's new in Android P @ I/O Extended Bangkok 2018
What's new in Android P @ I/O Extended Bangkok 2018What's new in Android P @ I/O Extended Bangkok 2018
What's new in Android P @ I/O Extended Bangkok 2018
 
New things that android developer should not miss in 2019
New things that android developer should not miss in 2019New things that android developer should not miss in 2019
New things that android developer should not miss in 2019
 
Architecture Components In Real Life Season 2
Architecture Components In Real Life Season 2Architecture Components In Real Life Season 2
Architecture Components In Real Life Season 2
 
Bitmap management like a boss
Bitmap management like a bossBitmap management like a boss
Bitmap management like a boss
 
Android Architecture Component in Real Life
Android Architecture Component in Real LifeAndroid Architecture Component in Real Life
Android Architecture Component in Real Life
 
Hello, Android Studio 3.2 & Android App Bundle @ I/O Extended Bangkok 2018
Hello, Android Studio 3.2 & Android App Bundle @ I/O Extended Bangkok 2018Hello, Android Studio 3.2 & Android App Bundle @ I/O Extended Bangkok 2018
Hello, Android Studio 3.2 & Android App Bundle @ I/O Extended Bangkok 2018
 
Deep Dive Into Repository - Android Architecture Components
Deep Dive Into Repository - Android Architecture ComponentsDeep Dive Into Repository - Android Architecture Components
Deep Dive Into Repository - Android Architecture Components
 
Introduction to Architecture Components @ Google I/O Extended Bangkok 2017
Introduction to Architecture Components @ Google I/O Extended Bangkok 2017Introduction to Architecture Components @ Google I/O Extended Bangkok 2017
Introduction to Architecture Components @ Google I/O Extended Bangkok 2017
 
What's new in Android O @ Google I/O Extended Bangkok 2017
What's new in Android O @ Google I/O Extended Bangkok 2017What's new in Android O @ Google I/O Extended Bangkok 2017
What's new in Android O @ Google I/O Extended Bangkok 2017
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Smart Lock for Password @ Game DevFest Bangkok 2015

  • 1. Smart Lock for Passwords Somkiat Khitwongwattana Android Developer@Nextzy & Android GDE & Contributor@Droidsans
  • 2. Smart Lock for Passwords Smart Lock • Signed-in across devices • For Android and Chrome • Reduce the risk of forgotten
  • 3. Smart Lock for Passwords Credentials API • Retrieve and save app login credentials • Auth.CREDENTIALS_API • Multiple user credentials supported
  • 4. Smart Lock for Passwords Credential Management Capability • Username • Name • Password • Profile Picture URL • Account Type
  • 5. Smart Lock for Passwords Smart Lock Flow • Auto sign-in • Multiple credentials • No credentials / Signed out • App start • Signed in
  • 6. Smart Lock for Passwords Smart Lock Flow
  • 7. Smart Lock for Passwords No credentials / Signed out
  • 8. Smart Lock for Passwords Auto sign-in
  • 9. Smart Lock for Passwords Multiple credentials
  • 10. Smart Lock for Passwords Get Started • Add Google Play Services dependency compile  'com.google.android.gms:play-­‐services:7.8.0' • Declare the version of Google Play services <application>     ...     <meta-­‐data  android:name="com.google.android.gms.version"                          android:value="@integer/google_play_services_version"  />     ...   </application>
  • 11. Smart Lock for Passwords Get Started • Create an OAuth 2.0 client ID • Open Google Developer Console • Create project
  • 12. Smart Lock for Passwords Get Started • Setup OAuth consent screen
  • 13. Smart Lock for Passwords Get Started • Create client ID
  • 14. Smart Lock for Passwords Get Started• Setup client ID
  • 15. Smart Lock for Passwords Get Started • Example client ID 478989446966-gdahdsjn77selo6f1rnab6e2pd1nq4f3.apps.googleusercontent.com
  • 16. Smart Lock for Passwords Let's Get Coding GoogleApiClient  mCredentialsApiClient;   ...   mCredentialsApiClient  =  new  GoogleApiClient.Builder(this)       .addConnectionCallbacks(this)       .enableAutoManage(this,  0,  this)       .addApi(Auth.CREDENTIALS_API)       .build();
  • 17. Smart Lock for Passwords Store Credentials Credential  credential  =  new  Credential.Builder(username)       .setPassword(password)       .setAccountType(accountType)       .setName(name)       .setProfilePictureUri(url)       .build();
  • 18. Smart Lock for Passwords Store Credentials Auth.CredentialsApi.save(mCredentialsApiClient,  credential)
                .setResultCallback(new  ResultCallback<Status>()  {          @Override          public  void  onResult(Status  status)  {                  ...          }   });
  • 19. Smart Lock for Passwords Store Credentials int  REQUEST_CODE_SAVE  =  123;   Status  status  =  result.getStatus();   if(status.isSuccess())  {          ...   }  else  {          if(status.hasResolution())  {                  status.startResolutionForResult(this,  REQUEST_CODE_SAVE);          }  else  {                  ...          }   }
  • 20. Smart Lock for Passwords Store Credentials
  • 21. Smart Lock for Passwords Store Credentials @Override   public  void  onActivityResult(int  requestCode,  int  resultCode,  Intent  data)  {          ...          if  (requestCode  ==  REQUEST_CODE_SAVE)  {                  if  (resultCode  ==  RESULT_OK)  {                          ...                  }  else  {                          ...                  }          }          ...   }
  • 22. Smart Lock for Passwords Request Credentials CredentialRequest  request  =  new  CredentialRequest.Builder()                  .setSupportsPasswordLogin(true)                  .build();
  • 23. Smart Lock for Passwords Request Credentials Auth.CredentialsApi.request(mCredentialsApiClient,  request)                  .setResultCallback(new  ResultCallback<CredentialRequestResult>()  {          @Override          public  void  onResult(CredentialRequestResult  credentialRequestResult)  {                  ...          }   });
  • 24. Smart Lock for Passwords Share Credentials with Apps and Sites • Verify website's sign-in domain by using the Google Search Console • Make an association to Play Developer Console • Must be available through HTTPS
  • 25. Smart Lock for Passwords Share Credentials with Apps and Sites
  • 26. Smart Lock for Passwords Share Credentials with Apps and Sites
  • 27. Smart Lock for Passwords Reference https://developers.google.com/identity/smartlock-passwords https://www.youtube.com/watch?v=M3Udfu6qidk Smart Lock for Passwords Documentation Google Play Services 7.5 (100 Days of Google Dev)