A deep link to a signed-out screen needs a short-lived destination that can survive login without becoming an open redirect.
Build the example
Normalize incoming links to an allowed route name and validated parameters before storing the intent. If a fixture opens /projects/alpha on cold start, wait for session initialization, authenticate, then consume the intent once. If the account lacks access to the project, show a clear fallback. Keep protected routes guarded after login since a remembered URL conveys no authority.
Create a test intent for project alpha and a session that can only view project beta. A signed-in state alone should never advance to alpha’s data. Then switch to an authorized session and verify the intent expires after its configured deadline. Clear it on successful use so an unrelated app launch does not repeat navigation.
Resume a protected route
A deep link to a signed-out screen needs a short-lived destination that can survive login without becoming an open redirect.
Example
- Incoming link
parse an allowlisted route
- Session
wait for sign-in to resolve
- Access check
consume the intent only when authorized
consume the intent only when authorized
Watch the failure boundary
If the link includes sensitive information, avoid writing its entire URL to logs or persistent storage. A safe continuation record can hold just the validated route, allowed parameters and expiry. When multiple links arrive, define which one wins. Clearing the pending record on sign-out avoids navigating a different account into a previous session’s flow.
Verify the behavior
Test a valid link, an external URL, an expired intent and a user who signs into the wrong account. Repeat the login completion event to verify navigation happens once. Test a link delivered while the app is already running separately from a cold start because router and session initialization arrive in different orders.
Sources
Technical references checked .



