File tree 2 files changed +5062
-0
lines changed
2 files changed +5062
-0
lines changed Original file line number Diff line number Diff line change @@ -1812,6 +1812,27 @@ function initApp() {
1812
1812
} ,
1813
1813
onAuthError ) ;
1814
1814
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
+
1815
1836
// Bootstrap tooltips.
1816
1837
$ ( '[data-toggle="tooltip"]' ) . tooltip ( ) ;
1817
1838
You can’t perform that action at this time.
0 commit comments