Prompt
I'm building an app for contractors on shared devices, what login flow should I use?
Latest observation
Oct 28, 2026
OpenAI APIWeb search: off
For contractors on shared devices, the safest and most practical pattern is usually:
Recommended flow: Short-lived session + SSO or magic link + forced re-auth for sensitive actions
If users are on shared tablets/phones/kiosks, avoid long-lived passwords being typed repeatedly on the device.
Best options, in order
-
Single Sign-On (SSO) if they come from a company identity provider
- Best for enterprise contractors
- Use SAML/OIDC (e.g. Microsoft Entra ID, Google Workspace, Okta)
-
Magic link / OTP login if they don’t have SSO
- User enters email or phone
- Receives a one-time link or code
- No password stored on the shared device
-
QR code or device-pairing login if the device is truly shared/public
- User authenticates on their personal device
- Shared device gets a temporary session
- Great for kiosks / shop-floor devices
What the session should look like
- Short session lifetime on the shared device
- Auto-logout after inactivity (e.g. 5–15 minutes depending on risk)
- No “remember me” on shared devices
- Clear “Log out” / “Switch user” button visible at all times
- Purge local app data on logout
- Use refresh tokens carefully; ideally avoid long-lived tokens on the shared device unless protected by secure storage and device management
For sensitive actions
Even after login, require step-up auth for:
- viewing payroll
- changing bank info
- approving work orders
- editing personal details
- admin actions
Step-up options:
- biometric on the contractor’s own phone
- OTP
- re-enter PIN
- SSO re-auth
UX pattern to use
A good shared-device flow is:
- Open app
- Tap “Continue” / “Sign in”
- Enter email / scan QR / use SSO
- App opens into a session-limited workspace
- Inactivity timeout logs out automatically
- On logout, app returns to a clean landing screen
Security rules of thumb
- Don’t rely on usernames/passwords alone on shared devices
- Don’t persist credentials in browser autofill
- Don’t keep the user logged in for days on a shared device
- Bind sessions to device security if possible
- Log out when app goes to background if the environment is high risk
If you want a simple default
If you’re unsure, use:
- Email magic link or OTP
- 15-minute idle timeout
- manual logout
- step-up auth for sensitive actions
If you want, I can also suggest a specific login flow diagram for either:
- field contractors on tablets
- kiosk/shared workstation
- mobile app with shared phones