Michael Lynn, Global Director of Developer Relations at MongoDB presents a talk focusing on MongoDB: The Server, Atlas: The Database as a Service, and Stitch: Backend as a Service
Serverless Application Development with MongoDB Stitch
1. Introduction to MongoDB and
Serverless App Development
with MongoDB Stitch
Michael Lynn
Worldwide Director of Developer Relations
2. @mlynn
Michael Lynn
{
‘name’: ‘Michael Lynn’,
‘title’: ‘Global DevRel@MongoDB’,
‘company’: ‘MongoDB’,
‘location: ‘Philadelphia, PA’,
‘twitter’: ‘@mlynn,
‘previous’: [
{ ‘title’: ‘Engineer’ },
{ ‘title’: ‘Developer’}
]
}
Who is this guy?
3. @mlynn
My goals for today
1. What is MongoDB Stitch
2. What is MongoDB Atlas
3. What does Idiomatic mean?
4. What’s Michael’s Twitter
Handle?
5. What authentication providers
does MongoDB Support?
6. Bonus: How does Stitch
enable more granular access
control?
6. @mlynn
“We set out to build a database that we would
want to use, so that whenever developers
wanted to build an application, they could
focus on the application, not on working
around the database.”
- Eliot Horowitz
11. @mlynn
QueryAnywhere
Bring MongoDB's rich query
language safely to your
application.
Build full apps for iOS,
Android, Web, and IoT
Functions
Integrate microservices,
server-side logic,
and cloud services.
Power apps or enable Data
as a Service with custom
APIs.
Mobile Sync
Automatically synchronize
data between MongoDB
Mobile and the Cloud.
(coming soon)
Triggers
React to database changes
in real time by executing
functions.
Respond immediately to
changing data.
Stitch Overview
12. @mlynn
Stitch Overview
MongoDB Query Language + Native DriversIntegrated Rules
Functions3rd Party Services
Native SDKs (JavaScript, Android, iOS)
Rest API
13. @mlynn
Stitch Overview
MongoDB Query Language + Native DriversIntegrated Rules
Functions3rd Party Services
Native SDKs (JavaScript, Android, iOS)
Rest API
22. @mlynn
Authentication Providers
● Simple Login API
● Pluggable Authentication Providers
○ Email/Password
○ OAuth (Facebook/Google)
○ Custom w/ JWT
○ … and more!
● Multiple Providers per App
○ Link user accounts
○ Log in with any provider
■ Google
■ Facebook
■ etc.
import {
Stitch,
UserPasswordCredential
} from 'mongodb-stitch-browser-sdk';
// Get the user-submitted email and
password
const { email, password } = userInput;
// Log in using the user’s credentials
await Stitch.auth.loginWithCredential(
new UserPasswordCredential(username,
password);
);
// Get data about the newly logged in user
const user = await Stitch.auth.user;
29. @mlynn
What does that mean?
MongoDB MongoDB Stitch
Collection Level Access
Control
Collection Level Access
Control
Document Level Control Document Level Control
Field Level Access Control
30. @mlynn
MongoDB Rules
● Specify exactly who sees what data
○ Customized for the Current User
○ Configured per Collection
● Enforce Document Schemas
● Fully Configurable
○ Pre-configured Templates
○ “Advanced Mode” JSON
OFFICE STAFF ACCESS
PHYSCIAN ACCESS
43. @mlynn
My goals for today
What authentication providers does MongoDB Stitch Support?
● Anonymous
● Email
● Facebook
● Google
● API Keys
● Custom
44. @mlynn
My goals for today: Bonus
How does MongoDB enable more granular access control?
Rules: MongoDB Stitch enables rules that enable developers to
segregate documents to have field-level access controls.