Skip to content

Conversation

@mruhlin-stytch
Copy link
Contributor

@mruhlin-stytch mruhlin-stytch commented Jul 16, 2025

Add a recipe for a remembered device flow using DFP.

Rather than try and make some of the existing components/api endpoints extensible (take dynamic redirect URLs, dynamic cookie names, etc.) I just created dedicated components and endpoints for this flow.

It's more (boilerplate) code, but IMO dedicated components/endpoints/etc that are obviously for this recipe make it clearer to follow, and in the context of a recipe book the goal is clarity and not code reuse/optimization.

Companion guide incoming.
Screenshot 2025-07-17 at 5 01 52 PM
Screenshot 2025-07-17 at 5 01 04 PM

@vercel
Copy link

vercel bot commented Jul 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stytch-nextjs-integration ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2025 9:00pm

{user.trusted_metadata?.known_devices && user.trusted_metadata.known_devices.length > 0 && (
<div style={styles.knownCountriesContainer}>
<p style={styles.successNote}>
💻 <strong>Known Devices:</strong> {user.trusted_metadata.known_devices.join(', ')}
Copy link
Contributor

@chris-stytch chris-stytch Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit
Size the clear and trusted device to the same vertical height and alignment.

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tried with >1, I wonder if it might be better to make a Known Devices box per known device, so instead of joining, have a component for each entry.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to look like this!
image

@mruhlin-stytch mruhlin-stytch requested review from a team and mbramlage-stytch July 18, 2025 15:45
@mruhlin-stytch mruhlin-stytch merged commit cb1e584 into main Jul 22, 2025
4 checks passed
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.

3 participants