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

GlobeeTechNight abceedのソーシャルログイン

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for amoriyasu amoriyasu
November 08, 2022

GlobeeTechNight abceedのソーシャルログイン

Avatar for amoriyasu

amoriyasu

November 08, 2022
Tweet

Other Decks in Technology

Transcript

  1. © 2022 Globee Inc. All rights reserved. 自己紹介 Androidエンジニア 守安 淳志

    好きなもの...ラーメン(体に悪そうなおいしいもの ) 趣味...絵を描くこと
  2. © 2022 Globee Inc. All rights reserved. AI英語教材abceed - 20種類以上の豊富な学習機能

    (TOEIC®、英検®の出題形式を含む) - 600タイトル以上の英語教材 - 問題のレコメンド・スコア予測 - オンライン模試
  3. © 2022 Globee Inc. All rights reserved. ソーシャルログインとは - 利用者視点

    SNSアカウントで他のサービスを利用するしくみ - 開発視点 SNSプロバイダーが提供する OAuth2.0/OpenIDConnectに基づいたトークンベースの認証 - ソーシャルログインサービスを利用するか、自前で実装
  4. © 2022 Globee Inc. All rights reserved. 解決したい課題 - アカウント登録の登録率の向上

    - メールアドレス/PWの入力を行う登録のハードルが高い - プラットフォーム間(Web, iOS, Android)での利用を促進したい - メールによる学習のリマインドやお知らせの効果を高めたい - Googleアカウントでログインしたいという要望
  5. © 2022 Globee Inc. All rights reserved. 今回対応する範囲 - Google

    ... Android標準。ソーシャルログインの利用割合が 1番。 - Apple ... iOS標準 - LINE ... ソーシャルログインの利用割合が 2番目。 候補: Twitter, FaceBook, ソーシャルログイン利用状況調査2021 https://socialplus.jp/report/2021
  6. © 2022 Globee Inc. All rights reserved. ソーシャルログインの流れ ※ nonce(number

    used onceの略) ... リプレイ 攻撃対策。ワンタイムトークン。 以下の情報が入ったIDトークンが欲しい - メールアドレス - nonce
  7. © 2022 Globee Inc. All rights reserved. PF共通で必要なこと それぞれのIDプロバイダごとにソーシャルサインインの設定を行う (Google

    API Console / Apple Developer / LINE Developers) - ソーシャルサインインの有効化 - クライアントID - リダイレクトURL
  8. © 2022 Globee Inc. All rights reserved. Sign In with

    Google - One Tap for Android ワンタップでログインできる One Tap UIを表示したタイミングでユーザー追加などはできない - Google Sign-In for Android (legacy) 従来のGoogleサインイン -> nonceの設定ができないっぽい? https://developers.google.com/identity/authentication
  9. © 2022 Globee Inc. All rights reserved. Sign In with

    Apple AppleからSDKなどが提供されていないのでWebviewにて実装。
  10. © 2022 Globee Inc. All rights reserved. Sign In with

    Apple scopeにemailを追加するとresponse_modeがform_post必須になる。 パラメータ - response_type 要求するレスポンスタイプ。今回はid_token。 - client_id クライアント識別子。 Apple Developer Consoleから 登録したSERVICE ID。 - redirect_uri Appleの認証後にリダイレクトされるURL。 - state レスポンスの照合に利用する。 - response_mode id_tokenを受け取りたい場合は、fragmentかform_postを指定する。 - scope 名前やメールアドレスを受け取りたい場合は、こちらをform_postに指定する。 https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms
  11. © 2022 Globee Inc. All rights reserved. Sign In with

    Apple Apple認証ページ以外は制限 ※今回Webview経由でAppleログインを実装していますが、login with amazonでは webviewの認証を良しとしてないので注意が必要かもしれません。 (良い方法あればご教授ください) https://developer.amazon.com/ja/docs/login-with-amazon/webview.html
  12. © 2022 Globee Inc. All rights reserved. Sign In with

    LINE LINEが提供するSDKで認証
  13. © 2022 Globee Inc. All rights reserved. Sign In with

    LINE - LINE SDKの組み込みのログインボタンを使う -> nonceが反映されなかった - ログインアクティビティを開始する LINEアプリがあればアプリ、なければブラウザ経由の認証となる https://developers.line.biz/ja/docs/android-sdk/integrate-line-login/#add-line-sdk-dependency
  14. © 2022 Globee Inc. All rights reserved. Sign In with

    LINE LINEアプリがあればアプリ、なければブラウザ経由の認証となる https://developers.line.biz/ja/docs/android-sdk/integrate-line-login/#add-line-sdk-dependency
  15. © 2022 Globee Inc. All rights reserved. まとめ - アカウント登録の登録率の向上

    - メールアドレス/PWでの登録のハードルが高い - プラットフォーム間(Web, iOS, Android)での利用を促進したい - メールによる学習のリマインドやお知らせの効果を高めたい - Googleアカウントでログインしたいという要望
  16. © 2022 Globee Inc. All rights reserved. さいごに Globeeでは「Andriod /

    iOSエンジニア」の採用活動を積極的に行なっております!