Skip to content

fix: in-app redirect existing email#4430

Merged
sshanzel merged 2 commits into
mainfrom
fix-facebook-redirect-fail
Apr 21, 2025
Merged

fix: in-app redirect existing email#4430
sshanzel merged 2 commits into
mainfrom
fix-facebook-redirect-fail

Conversation

@sshanzel
Copy link
Copy Markdown
Contributor

@sshanzel sshanzel commented Apr 16, 2025

Changes

  • Same issue fixed here: bbeafda
    • Where the user is trying to login with an email that is already associated with another account.
  • The only difference here, this is to fix the redirect flow because we now have to support auth for both redirect and callback postMessage :hide_the_pain:
  • Context: when a user from Facebook in-app browser tries to login, and the case above happened, the user should be redirected to the params we sent (redirect_to or return_to) - those params when initializing a flow will only be utilized when the flow was successful. With the edge case above, it is considered a failed flow so the redirection falls back to our callback page instead of the redirect params we sent.
  • Using session storage is ideal since the data goes away after closing the browser which is basically the same as closing the in-app browser.
  • We also added a process to utilize the flow sent by the failing attempt so we can display the error message.

Events

Did you introduce any new tracking events?

Experiment

Did you introduce any new experiments?

Manual Testing

Caution

Please make sure existing components are not breaking/affected by this PR

Preview domain

https://fix-facebook-redirect-fail.preview.app.daily.dev

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2025

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

Name Status Preview Updated (UTC)
daily-webapp ✅ Ready (Inspect) Visit Preview Apr 18, 2025 9:08am
1 Skipped Deployment
Name Status Preview Updated (UTC)
storybook ⬜️ Ignored (Inspect) Apr 18, 2025 9:08am

return;
}

window.sessionStorage.removeItem(AUTH_REDIRECT_KEY);
Copy link
Copy Markdown
Contributor Author

@sshanzel sshanzel Apr 16, 2025

Choose a reason for hiding this comment

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

Just to ensure the storage is clean until interaction starts.

Copy link
Copy Markdown
Contributor

@rebelchris rebelchris left a comment

Choose a reason for hiding this comment

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

Just make sure to do critical flows

@sshanzel sshanzel merged commit 01fe051 into main Apr 21, 2025
10 checks passed
@sshanzel sshanzel deleted the fix-facebook-redirect-fail branch April 21, 2025 08:34
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