Redirect to client app after email verification#13
Merged
alejandro-runner merged 1 commit intosynvya-stagingfrom Apr 13, 2026
Merged
Redirect to client app after email verification#13alejandro-runner merged 1 commit intosynvya-stagingfrom
alejandro-runner merged 1 commit intosynvya-stagingfrom
Conversation
After verifying their email, users were landing on the Keycast dashboard instead of being redirected back to the originating client app (e.g. account.synvya.com). This adds an optional redirect_uri parameter to registration that is stored and returned as redirect_to after verification, leveraging the existing frontend redirect logic. Closes #12 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
redirect_uriparameter to/api/auth/registerso client apps can specify where users should return after email verificationredirect_uriin theuserstable and returns it asredirect_toin the verify-email responseredirect_to(OAuth redirect logic), so no frontend changes neededCloses #12
Changes
database/migrations/20260412000000_add_user_redirect_uri.sqlredirect_uricolumn touserscore/src/repositories/user.rsredirect_uriin registration and verification queriesapi/src/api/http/auth.rsredirect_urion register, validates it (HTTPS or localhost), returns it after verification with?verified=1How it works
POST /api/auth/registerwithredirect_uri: "https://account.staging.synvya.com"redirect_to: "https://account.staging.synvya.com?verified=1"Client-side change required
The Synvya account app needs to include
redirect_uriin its registration request body.Test plan
redirect_uriset → verify email → confirm redirect to client app with?verified=1redirect_uri→ verify email → confirm existing behavior (redirect to/)redirect_uri(e.g.ftp://...) → confirm it's silently ignored🤖 Generated with Claude Code