isPendingRedirect() and browser 'back' navigation
See original GitHub issueI’m using the result of isPendingRedirect()
to update the page in which the widget is contained (this is a Vue-based SPA), and also to show / hide a ‘log in anonymously’ button. But if the user clicks on, say, ‘Sign in with Email’, they are taken to the account chooser page (away from my app). If they then realise they clicked on the wrong button and hit the browser ‘back’ button, my app is loaded again, but isPendingRedirect()
returns true
, so my page now doesn’t have a log in anonymously button, and also the label now says ‘Please wait’ instead of ‘Please log in’, as it’s expecting the login to be in progress.
How can I tell the difference between my page loading because there really is a pending login, and simply due to navigation?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Has firebaseUI no 'keep me signed in' option? - Stack Overflow
I have figured out how to implement firebaseUI with user controlled persistence ('keep me signed in' option). The solution involves (1) ...
Read more >Easily add sign-in to your Web app with FirebaseUI - Google
isPendingRedirect() to detect if the URL corresponds to a sign-in with ... An optional emailLinkSignIn callback can be defined to return the firebase.auth....
Read more >Convert UiApp to HtmlService, HtmlService Google Script, Google ...
HtmlService: Service for returning HTML and other text content from a script. ... isPendingRedirect() to detect if the URL corresponds to a sign-in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@fterradev Agreed - is there no way at all to determine if the user canceled the login flow by hitting the back button??
isPendingRedirect()
is to determine whether the UI needs to be rendered to complete asignInWithRedirect
,linkWithRedirect
oraccountchooser.com
redirect operations. If the user hits aSign in with email
button accidentally and then the user clicks the browser back button, showing the UI again is still reasonable as it should render the sign-in UI (which is the screen where the user was before the redirect).