Currently Meteor.loggingIn() returns us a Boolean reactive var depicting if a user is logging in or not. What I propose is a simple addition to this with Meteor.loggingInStatus(). This reactive var will return either a Boolean of false if not logging in or an Object with the type of login method invoked i.e. { type: "resume" }. This would not effect the current implementation of Meteor.loggingIn().
Why?
I consistently have used different methods of hiding the UI when logging in with Meteor apps made with React. Most of these methods include hiding the page with CSS if logging in on pages that are not the login page (so you don't get an odd flash of the UI swapping out the different authenticated elements). This works but takes more steps to implement. My goal would be to simplify this process and only hide the UI on certain type of login events, utilizing Meteor.loggingInStatus(). While it's a very small feature, it would make that weird app UI flash easier to fix. A current fix can be done with with Community Method Hooks which works great but since this can be easily implemented into the accounts-base package I would like to propose it.
Currently
Meteor.loggingIn()
returns us a Boolean reactive var depicting if a user is logging in or not. What I propose is a simple addition to this withMeteor.loggingInStatus()
. This reactive var will return either a Boolean offalse
if not logging in or an Object with the type of login method invoked i.e.{ type: "resume" }
. This would not effect the current implementation ofMeteor.loggingIn()
.Why? I consistently have used different methods of hiding the UI when logging in with Meteor apps made with React. Most of these methods include hiding the page with CSS if logging in on pages that are not the login page (so you don't get an odd flash of the UI swapping out the different authenticated elements). This works but takes more steps to implement. My goal would be to simplify this process and only hide the UI on certain type of login events, utilizing
Meteor.loggingInStatus()
. While it's a very small feature, it would make that weird app UI flash easier to fix. A current fix can be done with with Community Method Hooks which works great but since this can be easily implemented into theaccounts-base
package I would like to propose it.Happy to implement this myself if approved.