what’s new in authentication - devstreaming-cdn.apple.com€¦ · •sign in with apple •...

94
© 2019 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. #WWDC19 Ricky Mondello, iOS Engineer What’s New in Authentication Easier and more secure sign-in

Upload: others

Post on 26-Jul-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

© 2019 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

#WWDC19

Ricky Mondello, iOS Engineer

•What’s New in Authentication •Easier and more secure sign-in

Page 2: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

•Sign In with Apple •Password-based authentication •Warnings for weak passwords •OAuth sign-in •USB security keys on macOS

Page 3: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

•Sign In with Apple •Password-based authentication •Warnings for weak passwords •OAuth sign-in •USB security keys on macOS

Page 4: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 5: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Use your Apple ID “[email protected]" to sign in to Bird and create your account

with the information below.

Page 6: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 7: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 8: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Easier than passwords

Page 9: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Sign In with Apple accounts are secure, verified accounts

Page 10: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 11: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 12: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 13: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Introducing Sign In with Apple WWDC 2019

Page 14: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

•Sign In with Apple •Password-based authentication •Warnings for weak passwords •OAuth sign-in •USB security keys on macOS

Page 15: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

•Sign In with Apple •Password-based authentication •Warnings for weak passwords •OAuth sign-in •USB security keys on macOS

Page 16: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 17: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 18: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// https://example.com/.well-known/apple-app-site-association

{ "webcredentials": { "apps": [ "A1B2C3D4E5.com.example.Shiny" ] } }

Page 19: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// https://example.com/.well-known/apple-app-site-association

{ "webcredentials": { "apps": [ "A1B2C3D4E5.com.example.Shiny", "A1B2C3D4E5.uikitformac.com.example.Shiny" ] } }

Page 20: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// https://example.com/.well-known/apple-app-site-association

{ "webcredentials": { "apps": [ "A1B2C3D4E5.com.example.Shiny", "A1B2C3D4E5.uikitformac.com.example.Shiny" ] } }

Page 21: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// https://example.com/.well-known/apple-app-site-association // Universal Links

{ "applinks": { "apps": [], "details": [ { "appID": "A1B2C3D4E5.com.example.Shiny", "components": [ { "/": "/a/path/*" } ] } ] } }

Page 22: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// https://example.com/.well-known/apple-app-site-association // Universal Links // Handling multiple apps (iOS 13, macOS 10.15)

{ "applinks": { "apps": [], "details": [ { "appID": "A1B2C3D4E5.com.example.Shiny", "appIDs": [ "A1B2C3D4E5.com.example.Shiny", "A1B2C3D4E5.uikitformac.com.example.Shiny" ], "components": [ { "/": "/a/path/*" } ] } ] } }

Page 23: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// https://example.com/.well-known/apple-app-site-association // Universal Links // Handling multiple apps (iOS 13, macOS 10.15)

{ "applinks": { "apps": [], "details": [ { "appID": "A1B2C3D4E5.com.example.Shiny", "appIDs": [ "A1B2C3D4E5.com.example.Shiny", "A1B2C3D4E5.uikitformac.com.example.Shiny" ], "components": [ { "/": "/a/path/*" } ] } ] } }

Page 24: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// https://example.com/.well-known/apple-app-site-association // Universal Links // Maintaining compatibility with iOS prior to iOS 13

{ "applinks": { "apps": [], "details": [ { "appID": "A1B2C3D4E5.com.example.Shiny", "appIDs": [ "A1B2C3D4E5.com.example.Shiny", "A1B2C3D4E5.uikitformac.com.example.Shiny" ], "components": [ { "/": "/a/path/*" } ] } ] } }

Page 25: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// https://example.com/.well-known/apple-app-site-association // Universal Links // Maintaining compatibility with iOS prior to iOS 13

{ "applinks": { "apps": [], "details": [ { "appID": "A1B2C3D4E5.com.example.Shiny", "appIDs": [ "A1B2C3D4E5.com.example.Shiny", "A1B2C3D4E5.uikitformac.com.example.Shiny" ], "components": [ { "/": "/a/path/*" } ] } ] } }

Page 26: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// https://example.com/.well-known/apple-app-site-association // Universal Links // Maintaining compatibility with iOS prior to iOS 13

{ "applinks": { "apps": [], "details": [ { "appID": "A1B2C3D4E5.com.example.Shiny", "appIDs": [ "A1B2C3D4E5.com.example.Shiny", "A1B2C3D4E5.uikitformac.com.example.Shiny" ], "components": [ { "/": "/a/path/*" } ] } ] } }

Page 27: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// https://example.com/.well-known/apple-app-site-association // Universal Links // Maintaining compatibility with iOS prior to iOS 13

{ "applinks": { "apps": [], "details": [ { "appID": "A1B2C3D4E5.com.example.Shiny", "appIDs": [ "A1B2C3D4E5.com.example.Shiny", "A1B2C3D4E5.uikitformac.com.example.Shiny" ], "components": [ { "/": "/a/path/*" } ] } ] } }What’s New in Universal Links WWDC 2019

Page 28: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 29: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 30: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 31: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Saved from shiny.example.com

Page 32: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting a password-based account for sign-in

import AuthenticationServices

Page 33: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting a password-based account for sign-in

import AuthenticationServices

Page 34: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting a password-based account for sign-in

import AuthenticationServices

let controller = ASAuthorizationController(authorizationRequests: [ ASAuthorizationPasswordProvider().createRequest() ])

Page 35: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting a password-based account for sign-in

import AuthenticationServices

let controller = ASAuthorizationController(authorizationRequests: [ ASAuthorizationPasswordProvider().createRequest() ])

Page 36: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting a password-based account for sign-in

import AuthenticationServices

let controller = ASAuthorizationController(authorizationRequests: [ ASAuthorizationPasswordProvider().createRequest() ])

controller.delegate = self controller.presentationContextProvider = self

Page 37: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting a password-based account for sign-in

import AuthenticationServices

let controller = ASAuthorizationController(authorizationRequests: [ ASAuthorizationPasswordProvider().createRequest() ])

controller.delegate = self controller.presentationContextProvider = self

Page 38: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting a password-based account for sign-in

import AuthenticationServices

let controller = ASAuthorizationController(authorizationRequests: [ ASAuthorizationPasswordProvider().createRequest() ])

controller.delegate = self controller.presentationContextProvider = self

controller.performRequests()

Page 39: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting a password-based account for sign-in

import AuthenticationServices

let controller = ASAuthorizationController(authorizationRequests: [ ASAuthorizationPasswordProvider().createRequest() ])

controller.delegate = self controller.presentationContextProvider = self

controller.performRequests()

Page 40: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting a password-based account for sign-in

// ASAuthorizationControllerDelegate func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) { if let credential = authorization.credential as? ASPasswordCredential { // Use credential.user and credential.password to sign in. } }

Page 41: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting a password-based account for sign-in

// ASAuthorizationControllerDelegate func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) { if let credential = authorization.credential as? ASPasswordCredential { // Use credential.user and credential.password to sign in. } }

Page 42: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting a password-based account for sign-in

// ASAuthorizationControllerDelegate func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) { if let credential = authorization.credential as? ASPasswordCredential { // Use credential.user and credential.password to sign in. } }

func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) { // Fall back to login UI. }

Page 43: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting a password-based account for sign-in

// ASAuthorizationControllerDelegate func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) { if let credential = authorization.credential as? ASPasswordCredential { // Use credential.user and credential.password to sign in. } }

func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) { // Fall back to login UI. }

Page 44: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Introducing Password AutoFill for Apps WWDC 2017

What’s New in Universal Links WWDC 2019

Associated Domains

Page 45: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting both Sign In with Apple and password-based accounts for sign-in

let controller = ASAuthorizationController(authorizationRequests: [ ASAuthorizationAppleIDProvider().createRequest() ASAuthorizationPasswordProvider().createRequest() ])

controller.delegate = self controller.presentationContextProvider = self

controller.performRequests()

Page 46: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting both Sign In with Apple and password-based accounts for sign-in

let controller = ASAuthorizationController(authorizationRequests: [ ASAuthorizationAppleIDProvider().createRequest() ASAuthorizationPasswordProvider().createRequest() ])

controller.delegate = self controller.presentationContextProvider = self

controller.performRequests()

Page 47: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting both Sign In with Apple and password-based accounts for sign-in

// ASAuthorizationControllerDelegate func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) { switch authorization.credential { case let credential as ASAuthorizationAppleIDCredential: // Sign the user in using the Apple credential.

case let credential as ASPasswordCredential: // Sign the user in using the password credential.

default: // Fall back to login UI. } }

Page 48: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Requesting both Sign In with Apple and password-based accounts for sign-in

// ASAuthorizationControllerDelegate func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) { switch authorization.credential { case let credential as ASAuthorizationAppleIDCredential: // Sign the user in using the Apple credential.

case let credential as ASPasswordCredential: // Sign the user in using the password credential.

default: // Fall back to login UI. } }

Page 49: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

•Sign In with Apple •Password-based authentication •Warnings for weak passwords •OAuth sign-in •USB security keys on macOS

Page 50: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

•Sign In with Apple •Password-based authentication •Warnings for weak passwords •OAuth sign-in •USB security keys on macOS

Page 51: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 52: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Use "[email protected]"

Page 53: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 54: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 55: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 56: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 57: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 58: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

https://example.com/ .well-known/change-password

Page 59: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Well-Known URL for Changing Passwords

wicg.github.io/change-password-url

Page 60: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

•Sign In with Apple •Password-based authentication •Warnings for weak passwords •OAuth sign-in •USB security keys on macOS

Page 61: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

•Sign In with Apple •Password-based authentication •Warnings for weak passwords •OAuth sign-in •USB security keys on macOS

Page 62: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 63: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Example Identity Provider

The Shiny app by would like to use your account.

This will give Shiny your name.

Allow Shiny access?

Allow

Do Not Allow

Signed in as: [email protected]

Page 64: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 65: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

NEW

Example Identity ProviderThe Shiny app by would like to use your account.

This will give Shiny your name.

Allow Shiny access?

Signed in as: [email protected]

Allow

Do Not Allow

Page 66: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

OAuth with ASWebAuthenticationSession

•More private sign-in •Supporting multiple windows •Migrating from SFAuthenticationSession

Page 67: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

OAuth with ASWebAuthenticationSession

•More private sign-in •Supporting multiple windows •Migrating from SFAuthenticationSession

Page 68: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 69: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Use “[email protected]"

Sign in

Email

Password

Log in to example.com?

Example Identity Provider

Sign in to allow the app Shiny to connect to your account.

Page 70: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Giving users additional privacy using ASWebAuthenticationSession

import AuthenticationServices

func signIn() { let session = ASWebAuthenticationSession(url: URL(string: "https://example.com/login")!, callbackURLScheme: "custom-oauth-scheme", completionHandler: { (callbackURL, error) in // Handle login }) session.prefersEphemeralWebBrowserSession = true session.start() }

NEW

Page 71: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Giving users additional privacy using ASWebAuthenticationSession

import AuthenticationServices

func signIn() { let session = ASWebAuthenticationSession(url: URL(string: "https://example.com/login")!, callbackURLScheme: "custom-oauth-scheme", completionHandler: { (callbackURL, error) in // Handle login }) session.prefersEphemeralWebBrowserSession = true session.start() }

NEW

Page 72: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

OAuth with ASWebAuthenticationSession

•More private sign-in •Supporting multiple windows •Migrating from SFAuthenticationSession

Page 73: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Providing a window to the authentication session

import AuthenticationServices

func signIn() { let session = ASWebAuthenticationSession(url: URL(string: "https://example.com/login")!, callbackURLScheme: "custom-oauth-scheme", completionHandler: { (callbackURL, error) in // Handle login }) session.presentationContextProvider = self session.start() }

func presentationAnchor(for _: ASWebAuthenticationSession) -> ASPresentationAnchor { return /* the relevant window */ }

Page 74: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Providing a window to the authentication session

import AuthenticationServices

func signIn() { let session = ASWebAuthenticationSession(url: URL(string: "https://example.com/login")!, callbackURLScheme: "custom-oauth-scheme", completionHandler: { (callbackURL, error) in // Handle login }) session.presentationContextProvider = self session.start() }

func presentationAnchor(for _: ASWebAuthenticationSession) -> ASPresentationAnchor { return /* the relevant window */ }

Page 75: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

// Providing a window to the authentication session

import AuthenticationServices

func signIn() { let session = ASWebAuthenticationSession(url: URL(string: "https://example.com/login")!, callbackURLScheme: "custom-oauth-scheme", completionHandler: { (callbackURL, error) in // Handle login }) session.presentationContextProvider = self session.start() }

func presentationAnchor(for _: ASWebAuthenticationSession) -> ASPresentationAnchor { return /* the relevant window */ }

Page 76: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

OAuth with ASWebAuthenticationSession

•More private sign-in •Supporting multiple windows •Migrating from SFAuthenticationSession

Page 77: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

SFAuthenticationSessionSFAuthenticationSession

Page 78: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

ASWebAuthenticationSessionSFAuthenticationSession

Page 79: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

•Sign In with Apple •Password-based authentication •Warnings for weak passwords •OAuth sign-in •USB security keys on macOS

Page 80: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

•Sign In with Apple •Password-based authentication •Warnings for weak passwords •OAuth sign-in •USB security keys on macOS

Page 81: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Security Key

Page 82: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Security Key

Page 83: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

FIDO2-compliant

Security Key

Page 84: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

FIDO2-compliant

Security Key

Page 85: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Security Key

Page 86: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB
Page 87: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

•Sign In with Apple •Password-based authentication •Warnings for weak passwords •OAuth sign-in •USB security keys on macOS

Page 88: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

•Sign In with Apple •Password-based authentication •Warnings for weak passwords •OAuth sign-in •USB security keys on macOS

Page 89: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Summary

Page 90: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Summary

Adopt Sign In with Apple

Page 91: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Summary

Adopt Sign In with Apple

Make password sign-in easy

Page 92: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

Summary

Adopt Sign In with Apple

Make password sign-in easy

Implement /.well-known/change-password

Page 93: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB

More Informationdeveloper.apple.com/wwdc19/516

Page 94: What’s New in Authentication - devstreaming-cdn.apple.com€¦ · •Sign In with Apple • Password-based authentication • Warnings for weak passwords • OAuth sign-in • USB