Skip to content

feat(examples): add Functions + Secrets login recipe - #33

Draft
Kylejeong2 wants to merge 4 commits into
mainfrom
kylejeong/gro-2461-functions-secrets-login
Draft

Kylejeong2 wants to merge 4 commits into
mainfrom
kylejeong/gro-2461-functions-secrets-login

Conversation

@Kylejeong2

@Kylejeong2 Kylejeong2 commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Add a TypeScript cookbook recipe that uses Stagehand and Browserbase Functions Secrets to sign into Browserbase and check for its authenticated dashboard.

Why

GRO-2461 needs a runnable Functions + Secrets example suitable for a content walkthrough.

What changed

  • Add the isolated examples/typescript/browserbase-login-function package, locked dependencies, environment sample, and publish/Secrets/invocation instructions.
  • Use Stagehand to discover submit controls and Playwright to fill/click in the same session; restrict credentials to Browserbase and its Okta origin, enable session replays and default Stagehand logging, return sanitized outcomes, and close the browser on all paths.
  • Register the recipe and authored provenance, regenerate discovery pages, and add a dedicated install/typecheck/archive CI job. Constrain the hosted runtime to Node 24.x.
  • Supports direct email/password and Browserbase Okta password selection. Google and other identity providers are unsupported; any MFA must be completed by the user. Dashboard detection is an AI assessment, not a server-side identity assertion. The extension ID is intentionally a project-specific setup placeholder.

Testing (if applicable)

  • Passed: npm ci --ignore-scripts, npm run typecheck, Functions SDK registration, and npm run publish:function -- --dry-run in the recipe.
  • Passed: python3 scripts/catalog.py check, python3 scripts/verify.py, and python3 -B -m unittest discover -s tests (66 tests).
  • Passed: npx --yes prettier@3.9.6 --check . --ignore-unknown, ruff check scripts tests, and git diff --check.
  • Passed: hosted Function build and deployment using the uploaded Stagehand extension and Node 24.x.
  • Live account login remains unverified: all required Secrets are attached and the Okta password field is reachable, but a successful login has not been observed; awaiting confirmation that the password Secret is for Okta. Keep this PR in draft until that flow is exercised.

@socket-security

socket-security Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​playwright-core@​1.55.0661007899100
Addednpm/​@​browserbasehq/​sdk-functions@​1.0.3811009996100
Addednpm/​@​types/​node@​24.19.11001008196100
Addednpm/​@​browserbasehq/​stagehand@​4.1.0100100100100100

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant