Skip to content

Commit

Permalink
fix: hash routing incompatibility with email link (#870)
Browse files Browse the repository at this point in the history
Documents hash routing incompatibility with email link sign in.
Fixes #537
  • Loading branch information
bojeil-google authored Aug 4, 2021
1 parent 6304ef0 commit 936a80b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,14 @@ ui.start('#firebaseui-auth-container', {
// Additional state showPromo=1234 can be retrieved from URL on
// sign-in completion in signInSuccess callback by checking
// window.location.href.
// If you are using a fragment in the URL, additional FirebaseUI
// parameters will be appended to the query string component instead
// of the fragment.
// So for a url: https://www.example.com/#/signin
// The completion URL will take the form:
// https://www.example.com/?uid_sid=xyz&ui_sd=0#/signin
// This should be taken into account when using frameworks with "hash
// routing".
url: 'https://www.example.com/completeSignIn?showPromo=1234',
// Custom FDL domain.
dynamicLinkDomain: 'example.page.link',
Expand Down Expand Up @@ -1117,6 +1125,12 @@ if (firebase.auth().isSignInWithEmailLink(window.location.href)) {
Additional state passed in the <code>url</code> can be retrieved on sign-in
completion via the signInSuccess callbacks.

If you are using a fragment in the URL, additional FirebaseUI parameters will be
appended to the query string component instead of the fragment.
So for a url `https://www.example.com/#/signin`, the completion URL will take
the form `https://www.example.com/?uid_sid=xyz&ui_sd=0#/signin`.
This should be taken into account when using frameworks with "hash routing".

```javascript
// ...
signInSuccessWithAuthResult: function(authResult, redirectUrl) {
Expand Down

0 comments on commit 936a80b

Please sign in to comment.