Signing in from a deep link lands on the home page #47
Labels
No labels
bug
chore
data
feature
frontend
good first issue
intermediate
needs/docs
needs/research
needs/upstream
type/bug
type/external
type/feature
type/refactor
urgency
high
urgency
immediate
urgency
low
urgency
medium
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/cal#47
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What's wrong
If you open a link such as /explore while signed out, you see the welcome page. After signing in you land on
/, not on the page you opened.How to reproduce
/instead of /explore.Expected
After sign-in you return to the page you opened, query string included (except
login_error).Where to look
web/src/app/components/Welcome.tsx: the link usessignInUrl("/"). Build the return path fromusePathname()anduseSearchParams()(already imported there), droppinglogin_error.web/src/context/AuthContext.tsx:signInUrl.web/src/server/auth/session.ts:safeReturnToalready rejects off-site paths, so a local path is safe to pass.Done when
/it still returns to/.login_errorinto the next attempt.