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
Breeze Login
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Matt Darnall
October 24, 2016
Programming
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Breeze Login
How we built Breeze Login in the Dreamforce Mobile App
Matt Darnall
October 24, 2016
More Decks by Matt Darnall
See All by Matt Darnall
Building Salesforce1 Apps with Angular and Node.JS
mdarnall
0
3k
iOS Unit Testing Like a Boss
mdarnall
1
3.5k
Other Decks in Programming
See All in Programming
phperだってパンチカードでコーディングしたい
o0h
PRO
0
330
ChromeでローカルLLM
ryu1013
0
140
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Domain-Driven Transformation
hschwentner
2
2.3k
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
Railsバージョンを4倍にした話
optim
0
350
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
170
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
残高管理から台帳サービスへの進化
artoy
1
200
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Building Applications with DynamoDB
mza
96
7.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Between Models and Reality
mayunak
4
500
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
360
We Are The Robots
honzajavorek
0
400
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
940
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Building the Perfect Custom Keyboard
takai
2
910
Color Theory Basics | Prateek | Gurzu
gurzu
1
490
Transcript
BREEZE LOGIN
BREEZE ENABLES TWO FACTOR AUTHENTICATION BY COMBINING SOMETHING YOU KNOW
WITH SOMETHING YOU HAVE
IS THIS SOMETHING NEW?
WHAT MAKES UP BREEZE? > A mobile application > Salesforce
MobileSDK > OAuth Connected Apps on Salesforce > A simple API to look up the user and send emails
SHOW ME A PICTURE, PLEASE!
THE FLOW
THE MOBILE APPLICATION
USER FLOW
EMAIL AND TOKEN API
HANDLE THE REQUEST AND LOOKUP THE USER @HttpGet global static
void getBreezeLogin() { RestRequest req = RestContext.request; String regName = req.params.get(EVENTREGNAME_PARAM); String lastname = req.params.get(LASTNAME_PARAM); User user = BreezeService.findUser(regName, lastName) if (user != null){ BreezeService.createTokenAndSendEmail(user) createResponse(OK, user) } else { createResponse(NOT_FOUND, user) } }
CREATE THE TOKEN public static String createToken(String userName, Integer validFor)
{ JWT jwt = new JWT('RS256'); jwt.cert = 'Name Of Cert'; jwt.iss = 'Connected App Client Id'; jwt.sub = userName; jwt.aud = 'success.salesforce.com'; return jwt.issue(); }
SEND THE USER AN EMAIL public static void createTokenAndSendEmail(User user){
String jwtToken = createToken(user.UserName); Messaging.SingleEmailMessage message = createEmail(jwtToken) Messaging.sendEmail(message); }
CONNECTED APP
CREATING A CERTIFICATE > "Setup -> Security Console -> Certificate
and Key Management" > Self-Signed > Exportable > 2048 bits > Download Certificate file
CONFIGURE CONNECTED APP
SECURITY CONSIDERATIONS > User's must include the Last Name of
that matches the Registration Id. > Email in response is obfuscated > JWT is only valid for 30 minutes
THE MOBILE APPLICATION
USER GETS AN EMAIL' > The mobile client should open
up our App when the user clicks that link via Deep Linking https:// success.salesforce.com/ breezeLogin?jwt=XXXX > Universal links (iOS)/App Links (Android) associate normal web urls with applications > But there are some edge cases
CATCHING THE EDGE CASES > Users fall back to opening
the url in a web browser > Page has a button to manually launch the app > eventsbreeze://breezeLogin? jwt=XXXX
PARSING JWT AND AUTHENTICATING WITH SDK // https://success.salesforce.com/breezeLogin?jwt=XXXX // eventsbreeze://breezeLogin?jwt=XXXX
public void parseJwtAndAuthenticate() { String jwt = getIntent().getData().getQueryParameter("jwt"); UserAccountManager accManager = SalesforceSDKManager.getInstance() .getUserAccountManager(); accManager.switchToNewUser(jwt, "https://success.salesforce.com"); }
JWT EXCHANGED FOR ACCESS TOKEN > Given the JWT the
MobileSDK gets an access and refresh token > The mobile application is then given a fully fledged User object once this completes from the MobileSDK
WHAT WE SAW
BREEZE LOGIN > Convenient solution for users entering passwords >
Two-factor authentication > Easy to implement on the Salesforce platform > Adaptable for any mobile application
QUESTIONS? > Links http://bit.ly/breezelogin