Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Implement Social Login with Flask & authomatic
Search
Patrick Wang
August 01, 2014
Programming
240
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Implement Social Login with Flask & authomatic
Patrick Wang
August 01, 2014
More Decks by Patrick Wang
See All by Patrick Wang
使用 Jest 進行 Front-End Unit Test(線上 React 讀書會版)
patw0929
2
680
淺談使用 Appium 進行 React Native 雙平台(iOS & Android)App 的 E2E 自動化測試
patw0929
0
470
使用 Jest 進行 Front-End Unit Test
patw0929
9
2.5k
使用 Sketch 改善程式與設計的合作及標註方式
patw0929
6
2.1k
SVG 動畫二三事
patw0929
0
450
webpack 簡介
patw0929
2
540
淺談 RWD 與實做(用 Susy 1.0.9)
patw0929
2
630
Other Decks in Programming
See All in Programming
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
ActionController meets Protocol Buffers
sorah
0
530
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
110
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
sbt 2.0: takeoff
eed3si9n
0
160
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
気持ちぃ〜角丸 Squircle
ryu1013
0
310
Domain-Driven Transformation
hschwentner
2
2.3k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
480
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
150
残高管理から台帳サービスへの進化
artoy
1
200
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
174
15k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
800
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
630
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
Music & Morning Musume
bryan
48
7.4k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
410
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
Transcript
Implementing Social Login with Flask & authomatic patw / Front-End
Engineer 原始背景圖⽚片出處:Jason A. Howie @ flickr https://www.flickr.com/photos/jasonahowie/8583949219/ Gogolook Developers meet up ╳
MISSION 聽說卡關很久的 LINE whoscall 官網 之後要加上 Social Login 功能
MISSION • Facebook, Google and Twitter ! • 最好可以取得 User
的 E-mail & 電話 ! • 更好的話可以取得 User 朋友的這些資訊
SOLUTION 不會⼟土砲 ! 尋找現成 Extension 解決⽅方案 http://peterhudec.github.io/authomatic/
POC 安裝 pip install authomatic 程式碼參考 flask 範例: http://peterhudec.github.io/authomatic/examples/flask-simple.html
POC 先設定 config.py: 要填⼊入 key 資訊 得申請 Apps/API 先 …晚點說
POC 主要的 views.py:
POC login.html: ⺫⽬目前結果會像這樣:
POC 要進⼀一步取得其他資訊,查⼀一下各 provider 的⽂文件。 Facebook Google Twitter E-mail ✔ scope:
email 無法取得朋友的 ✔ scope: https:// www.googleapis.com/ auth/ plus.profile.emails.read ✘ 朋友名單 ✘ 2014/4/30 之後新開的應 ⽤用程式強制使⽤用 v2.0,僅 能取回同樣使⽤用此應⽤用程 式的朋友 ✔ scope: https:// www.google.com/m8/ feeds/ ✔ 你關注的⼈人 ⼿手機號碼 ✘ 查⽂文件 2011 年曾有過 user_mobile_phone ✔ 可以取得 Google Contacts 中的聯絡⼈人⼿手 機號碼 ✘ OpenCloseGraph?
POC views.py 稍作修改: Facebook 的部份 twitter 的部份
POC views.py 稍作修改: Google 的部份 取得聯絡⼈人的 名稱、E-mail、電話
POC 結果會像這樣:
應⽤用程式 API 申請⽅方法整理 ! "
$
! https://developers.facebook.com/apps/
!
!
%
" https://apps.twitter.com/
"
"
開發期的⼩小技巧 sudo /etc/hosts
Thank you https://github.com/patw0929/flask-social-login-demo