File tree Expand file tree Collapse file tree 2 files changed +5062
-0
lines changed Expand file tree Collapse file tree 2 files changed +5062
-0
lines changed Original file line number Diff line number Diff line change @@ -1812,6 +1812,27 @@ function initApp() {
18121812 } ,
18131813 onAuthError ) ;
18141814
1815+ // Try sign in with redirect once upon page load, not on subsequent loads.
1816+ // This will demonstrate the behavior when signInWithRedirect is called before
1817+ // auth is fully initialized. This will fail on firebase/auth versions 0.21.0 and lower
1818+ // due to https://github.com/firebase/firebase-js-sdk/issues/6827
1819+ /*
1820+ if (sessionStorage.getItem('redirect-race-test') !== 'done') {
1821+ console.log('Starting redirect sign in upon page load.');
1822+ try {
1823+ sessionStorage.setItem('redirect-race-test', 'done');
1824+ signInWithRedirect(
1825+ auth,
1826+ new GoogleAuthProvider(),
1827+ browserPopupRedirectResolver
1828+ ).catch(onAuthError);
1829+ } catch (error) {
1830+ console.log('Error while calling signInWithRedirect');
1831+ console.error(error);
1832+ }
1833+ }
1834+ */
1835+
18151836 // Bootstrap tooltips.
18161837 $ ( '[data-toggle="tooltip"]' ) . tooltip ( ) ;
18171838
You can’t perform that action at this time.
0 commit comments