Skip to content

Computer: verified email to the computer's card, for Slack auto-link - #1063

Open
opencomputer-app[bot] wants to merge 1 commit into
mainfrom
auto-link-verified-email
Open

opencomputer-app[bot] wants to merge 1 commit into
mainfrom
auto-link-verified-email

Conversation

@opencomputer-app

Copy link
Copy Markdown
Contributor

Requested by @mohamed Habib in Slack.

Today a dashboard user has to DM the bot !link <code> before their dashboard account is linked to their Slack user. This PR does the public half of auto-linking them by verified email:

  • Edge: at every login, record the email WorkOS marks email_verified (users.verified_email, additive migration 0025; NULL otherwise). Assert it as verified_email to managed-agents on the dashboard's GET /computer only. API-key callers never carry it.
  • Backend: parse the claim and pass it to the computer's overview. For an unlinked user, it calls the optional ModelAccess.agents.autoLink and waits at most 3 s. The public build has no autoLink, so nothing changes there.
  • users.lookupByEmail added to the form-encoded Slack methods; SlackResult.user.id typed.

The hosted implementation is in the companion PR in opencomputer-deploy. The two merge independently: autoLink is optional, and until the edge sends the claim nothing calls it.

Tests: edge 660/660 (2 new); backend auth test (1 new). Overlaid on this branch, the subscription suites pass 171/171, and the computer route suites pass serially.

…mputer's card for Slack auto-link

The edge records the email WorkOS verified at each login (users.verified_email,
additive migration 0025) and asserts it as verified_email on the dashboard's
GET /computer only. The backend carries it to the Durable Object's overview,
which calls ModelAccess agents.autoLink (optional; absent in the public build)
for an unlinked user, bounded to 3 s. users.lookupByEmail is form-encoded.
@manicule-agent

Copy link
Copy Markdown

View docs preview
Commit ebe203a · 80 pages

Docs hosted with Margin

This branch has not been deployed

No deployments
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