Users and roles
The Users section decides who gets into your app and what they can do once inside. It has three pages: People, User roles, and Sign-in settings.
Roles
A role is a label on a person: customer, staff, admin. Create them on User roles and mark one as the Default, which every new signup gets automatically. Each change saves on its own. Your app always knows the role of whoever is signed in, so it can show the staff screens to staff and keep them hidden from everyone else.
Roles answer "who is this person?" What a paying customer gets is a separate question, answered by plans under Payments (lesson 6).
Who can sign up
Sign-in settings is one page, top to bottom: ways to sign in, who can sign up, staying signed in, and account security. Its Who can sign up section is the front door:
- Signups Open: turn it off to make your app invite-only.
- Require Email Verification: new people must confirm their email address before they can use the app.
- Domain Allowlist: let in only certain email addresses, like your company's.
- Blocklist: turn away specific addresses or whole email domains.
Staying signed in sets how long someone stays signed in before they must sign in again (Session Length, 1 hour by default), and how long people who choose to stay signed in are remembered (Remember Me Duration, 30 days by default).
Sign in with Kakao, Google, GitHub, or Apple
Email and password sign-in works from day one. To add a "Continue with Kakao" button, or one for Google, GitHub, or Apple, open Ways to sign in on the same page. Each company asks you to register your app with them first, which takes about ten minutes: the setup guide walks through each one, and the page shows the address to give them. Kakao, Google, and GitHub hand you two values to paste back. Apple hands you four, one of them a key file you can download only once, and it needs a paid Apple Developer membership. Press Save, and the button appears once that build is live. Because the button sits on your pages, this is the one sign-in setting that rebuilds your app.
People
People is where Users opens. It lists everyone with their role, lets you invite someone with a role already chosen, and lets you disable an account. Sign-up charts live in Analytics, under Users.
Activity
Every change your team makes to an account (a new role, a suspension, a removal, an invite) is recorded, along with each person's own sign-ups and sign-ins. They live on Activity, under Run, next to the edits made to your data, so one timeline answers "who did this, and when?"
Built in, no rebuild
Roles, signup rules, verification emails, and staying signed in are run by DontCode's sign-in service, not by code inside your app. Change a rule and it applies right away to every way of signing in, with no build needed.
The same service turns away sign-ups from fake and throwaway email addresses, with nothing to switch on. The Sign-up emails row on Protection counts how many it stopped in the last 30 days.
Check your understanding
1.A feature should only be available to paying customers. What should gate it?
2.What does the Default badge on a role mean?
3.You are adding a "Continue with Apple" button. What does Apple give you instead of a client secret?
Your task
Insight ProjectOpen Users, then User roles. Add at least one role and choose the default. Changes save on their own.