Nucleos · Senior Software Engineer take-home
Khan Academy onboarding script and auto sign-in extension
An onboarding script creates one free adult-learner account. A Manifest V3 Chrome extension then signs that user in. Both report only what they can prove. If the login fails, you see Khan Academy's error text word for word. A success toast appears only after Khan Academy's own API confirms who is signed in.
Node + PlaywrightChrome MV3one permission: storage23 tests
Extension (.zip)Unzip, then use Load unpacked in chrome://extensions
Full source (.zip)Script, extension, tests, README
GitHub repositorygithub.com/12s/nucleos-take-home
Run it
npm run setup # install + Playwright Chromium npm test # unit + end-to-end (offline) npm run onboard -- --email you+nucleos@example.com npm run use-account # give the verified account to the extension
Load the extension
- Open
chrome://extensionsand turn on Developer mode. - Click Load unpacked and pick the unzipped folder (or
extension/in the repo). - Open
khanacademy.org/loginwhile signed out. The shippedconfig.jsonis deliberately wrong, so the first run shows Khan Academy's error. - Put the real account in
config.local.json(git-ignored), reload the extension, and open the login page again to see the confirmed success toast.
How success is proven
- The account exists when Khan Academy's
getFullUserProfilequery returns a non-phantom user whose email is the one the script signed up with. - You're signed in when the same check, run from the page you land on after login, returns the configured user. A URL change alone isn't proof, and anything less than a match gets an amber "not confirmed" toast.
- One attempt per visit, and a bounce back to the login page is reported, never retried. This keeps repeated failures from locking the account.
Full design notes, permissions, limitations and AI-tool disclosure are in the README.