LOGIN ยท STABLE
Login is one call, not a user table.
Sign-up and log-in are the same call. The user signs in with their Bazaar account and your app gets their database. No passwords, sessions or user table to build or keep safe.
Ana's account one sign-in, every app
Your app her data for your app
Buzz her data for Buzz
Banter her data for Banter
SIGN-UP IS LOG-IN One call for both A popup on Bazaar, falling back to a redirect if the browser blocks it. New users sign up in the same window.
NOTHING TO STORE No passwords in your app Bazaar keeps the account. The SDK keeps the sign-in token in the browser. Your app never sees a password.
ONE ACCOUNT Users bring their account along Someone who uses another Bazaar app already has an account. They sign in, not up.
Three lines between a visitor and their data.
Create the app with its ID, call login from a button, render when it lands. No auth server to run.
// sign-up and log-in are one call const bzr = new BazaarApp({ appId, loginRedirectUri }) bzr.onLogin(() => render()) button.onclick = () => bzr.login()
// on page load, and when the user leaves if (bzr.isLoggedIn()) render() bzr.logOut()
Popup or redirect Popup by default, with a redirect fallback. Pick
LoginType.REDIRECT if your app can't use popups. The user's database is ready No provisioning step. A collection is created in the user's account the first time your app uses it.
Errors you can show
onLoginError tells you when sign-in failed and why, so the user isn't left guessing. What login won't do for you.
Your own account system Every user needs a Bazaar account. There's no email-and-password sign-up inside your app.
Anonymous visitors Reading and writing data needs a signed-in user. Anonymous reads aren't supported.
Roles on the account Who may do what is a grant on the data, not a role on the user. See Sharing.