feat: shareable score links and og card images#60
Open
Gmin2 wants to merge 1 commit into
Open
Conversation
|
@Gmin2 is attempting to deploy a commit to the Dodo Payments Team on Vercel. A member of the Team first needs to authorize it. |
thepushkaraj
left a comment
Collaborator
There was a problem hiding this comment.
Hey @Gmin2, Thanks for working on this, it's working correctly.
I have one suggestion: We can show the time it was scanned here since we already carry t.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a share flow to the playground. when you score a site you now get a signed link (/play/r/) and an og image at
/api/og/score, so dropping the link on x or slack unfurls a card with the score, level and domain. the result rides inside the url as an hmac signed token, no datastore, and the signature stops anyone faking a score. one env var,DUALMARK_SHARE_SECRET, signs the tokens. if its unset the playground still works, the share buttons just dont render.Note: we need to move the snapshots into a kv cache store (vercel kv / upstash) instead of url tokens. that gives short opaque links, real expiry and revocation, and room to store the full check breakdown. currently we pack the whole result into the url as an hmac signed token, so theres no datastore to run, but the links are long and you cant expire or revoke a single one.
Changes
Fixes #42
Type
AEO_SPEC_VERSION)Verification
bun run buildpassesbun run testpassesbun run typecheckpassesdualmark verifyagainst the example end-to-end/spec/: ranbun run --filter dualmark-docs sync-specand committed the mirrorChangeset
bun run changeset) for any package with a user-visible change