Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Sign In with Apple

Sign In with Apple

CA.swift #9 WWDC19報告会
https://cyberagent.connpass.com/event/129850/

D390d62a9772cf2e0bd8000157abbff8?s=128

Takeshi Ihara

June 19, 2019
Tweet

More Decks by Takeshi Ihara

Other Decks in Programming

Transcript

  1. Sign In with Apple 2019/06/19 Takeshi Ihara

  2. Takeshi Ihara • 2018.09.01 AbemaTV Join • ϘϧμϦϯάͱ֨ಆήʔϜ͕झຯ • https://github.com/Nonchalant

    • https://twitter.com/nonchalant0303
  3. ؔ࿈ηογϣϯ • Introducing Sign In with Apple (Session 706) •

    What’s New in Authentication, Safari, and WebKit (Session 504)
  4. ࠓ೔࿩͢͜ͱ • Sign In with Apple ͱ͸ • Sign In

    with Apple ͷߏ଄ • LabͰ࣭໰͖ͯͨ͜͠ͱ
  5. ࠓ೔࿩͞ͳ͍͜ͱ • Sign In with Apple ͷ࣮૷ํ๏ ɾhttps://developer.apple.com/documentation/authenticationservices ɾhttps://developer.apple.com/documentation/signinwithapplejs

  6. Sign In with Apple ͱ͸

  7. None
  8. Sign In with Apple ͱ͸ • Respect for privacy ɾ໊લͱϝʔϧΞυϨε͔͠औಘͰ͖ͳ͍

    ɾαʔϏε͝ͱʹPrivateͳϝʔϧΞυϨεΛൃߦՄೳ ɾApple͸αʔϏε಺ͷߦಈΛ௥੻͠ͳ͍
  9. Sign In with Apple ͱ͸ • Security Built in ɾ2ஈ֊ೝূΛઃఆ͍ͯ͠ΔApple

    IDͷΈར༻Մೳ ɾAppleσόΠεͰ͸Face ID or Touch IDͰαΠϯΠϯՄೳ
  10. Sign In with Apple ͱ͸ • Works everywhere ɾiOS, macOS,

    tvOS, watchOS, ϒϥ΢βͰಈ࡞Մೳ
  11. Sign In with Apple ͱ͸ • Antifraud ɾσόΠε্ͷػցֶश΍ͦͷଞͷ৘ใʹΑͬͯɺ ৽͍͠Ϣʔβʔ͕ਓ͔Bot͔Λ൑ผ͢Δ ɾϨεϙϯεʹؚ·Ε͍ͯΔ৘ใΛࢀߟʹͰ͖Δ

  12. iOS 13ͷϦϦʔεͱಉ࣌ʹར༻Մೳ (2019.09)

  13. Sign In with Apple ͷߏ଄

  14. Sign In with Apple ͷߏ଄ 1. Sign In with Apple

    2. Ϣʔβʔ৘ใΛཁٻ 3. Ϣʔβʔࣝผࢠͱ৘ใ 5. ΞΧ΢ϯτ 4. Ϣʔβʔࣝผࢠʹج͍ͮͯΞΧ΢ϯτ࡞੒
  15. Sign In with Apple ͷߏ଄ 1. Sign In with Apple

    JS 2. Ϣʔβʔ৘ใΛཁٻ 5. ΞΧ΢ϯτ 4. Ϣʔβʔࣝผࢠʹج͍ͮͯΞΧ΢ϯτ࡞੒ 3. ࢦఆͨ͠URLʹϦμΠϨΫτ
  16. App ID App ID App ID Apple Developer Team •

    ڞ௨ͷUserࣝผࢠ • PrivateͳEmailΞυϨεʹૹ৴ՄೳͳυϝΠϯ·ͨ͸ݸผΞυϨε • OAuth΍OpenID ConnectͷΑ͏ͳೝূن֨ͷKey܈
  17. Service ID Apple Developer Team Primary App ID App ID

    • ڞ௨ͷServiceࣝผࢠ • ServiceࣝผࢠΛ༻͍ͯϒϥ΢βͰαΠϯΠϯՄೳ • Serviceຖʹڞ௨ͷPrivateͳEmailΞυϨε ϒϥ΢β (ొ࿥ෆཁ) App ID • ୯ҰͷAppͷ৔߹͸Service IDෆཁ • PrivateͳEmailΞυϨε • ڞ௨ͷUserࣝผࢠ • PrivateͳEmailΞυϨεʹૹ৴ՄೳͳυϝΠϯ·ͨ͸ݸผΞυϨε • OAuth΍OpenID ConnectͷΑ͏ͳೝূن֨ͷKey܈
  18. • Apple Developer (چ iOS Dev Center) Sign In with

    Apple ͷߏ଄
  19. Lab Ͱ࣭໰͖ͯͨ͜͠ͱ

  20. Lab Ͱ࣭໰͖ͯͨ͜͠ͱ • PrivateͳΞυϨεʹϝʔϧΛૹ৴͢Δํ๏ • PrivateͳΞυϨεͷRevoke • Sign In with

    Apple JS ͰͷϢʔβʔ৘ใͷऔΓํ • 3rd PartyϩάΠϯͷϘλϯΑΓ্ʹஔ͔ͳ͍৔߹͸ϦδΣΫτର৅͔ʁ • 3rd PartyϩάΠϯΛαϙʔτ͍ͯ͠ΔΞϓϦͰɺSign In with Apple Λαϙʔ τ͠ͳ͍৔߹͸ϦδΣΫτର৅͔ʁ • AuthenticationServices.ASFoundationͱ͸ͳʹ͔ʁ
  21. Lab Ͱ࣭໰͖ͯͨ͜͠ͱ (akatsuki174) • ΞΧ΢ϯτΛෳ਺࣋ͯΔαʔϏεͰ͸Ͳ͏ରԠ͢Ε͹Α͍͔ • Sign In with AppleͰαΠϯΠϯͨ͠ޙʹ೥ྸͳͲΛ௥ՃͰऔಘ͢Δͷ͸ΞϦ

    ͳͷ͔ʁ
  22. PrivateͳΞυϨεʹϝʔϧΛૹ৴͢Δํ๏ • Apple Developer Ͱࣄલʹొ࿥ͨ͠υϝΠϯ·ͨ͸ΞυϨεͰૹΕΔ • ૹ৴ऀͱड৴ऀ͕ಉҰͩͱૹΕͳ͍ • Sign In

    with Apple Λෳ਺ͨ͠ͱ͖ʹɺ࠷ॳʹੜ੒͞ΕͨΞυϨεͷΈ༗ޮ ɾຖճಉ͡ΞυϨε͕ੜ੒͞ΕΔΑ͏ʹमਖ਼͞Εͯ·ͨ͠ (2019.06.19)
  23. PrivateͳΞυϨεͷRevoke • ઃఆΞϓϦ·ͨ͸ϒϥ΢β͔ΒService୯ҐͰRevokeՄೳ ɾhttps://appleid.apple.com

  24. Sign In with Apple JS ͰͷϢʔβʔ৘ใͷऔΓํ • ·ͩఏڙ͍ͯ͠ͳ͍ (2019.06.19)

  25. 3rd PartyϩάΠϯͷϘλϯΑΓ্ʹஔ͔ͳ͍৔߹͸
 ϦδΣΫτର৅͔ʁ • In a stacked layout, place the

    Sign In with Apple button above the other buttons. ɾhttps://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple/overview/ • HIG͔Β্هจݴ͕࡟আ͞Ε͍ͯ·ͨ͠ (2019.06.19)
  26. 3rd PartyϩάΠϯΛαϙʔτ͍ͯ͠ΔΞϓϦͰɺ Sign In with Apple Λαϙʔτ͠ͳ͍৔߹͸ϦδΣΫτର৅͔ʁ • ·ܾͩΊ͍ͯͳ͍ (2019.06.05)

  27. AuthenticationServices.ASFoundationͱ͸ͳʹ͔ʁ • Foundationͱͷ಺෦௨৴Ϋϥε • Jump to DefinitionͰ͖ͳ͍

  28. ΞΧ΢ϯτΛෳ਺࣋ͯΔαʔϏεͰ͸Ͳ͏ରԠ͢Ε͹Α͍͔ • ͻͱͭͷApple IDͰෳ਺ΞΧ΢ϯτͷ࡞੒Λαϙʔτ͍ͯ͠ͳ͍ ɾαʔϏεଆͰղܾ͢Δ͔͠ͳͦ͞͏

  29. Sign In with AppleͰαΠϯΠϯͨ͠ޙʹ೥ྸͳͲΛ௥ՃͰऔಘ͢Δ ͷ͸ΞϦͳͷ͔ʁ • αʔϏεͱͯ͠ඞཁͳ৘ใ͸ͱͬͯ΋Α͍ɺFacebook࿈ܞͳͲ΋ಉ༷ • Sign In

    with Apple ͸͋͘·ͰαΠϯΠϯͷखஈ
  30. Thank you

  31. iOSDC 2019 • ಈըΞϓϦͷ౤͛મػೳʹ͓͚Δ
 ফ໣ܕ՝ۚͷ࢓૊Έͱ࣮૷ • https://twitter.com/nonchalant0303 ͷݻఆπΠ