My app is internationalized using the
tap:i18n package. I’ve also set-up a user preference, so the app will show up in the correct language if the user logs in. I placed this logic in an onSubmit() hook of the
This works if the user logs in via the login form, but it doesn’t work if the user is logged in transparently, using a login token. So after a hot-code reload, for instance, my app always shows up in its default language, i.e. English.
I’ve also tried the Accounts.onLogin() hook, but this behaves just the same. Of course, I could use a global
Tracker.autorun() and check for Meteor.userId(), but this seems like a hack to me. And it also doesn’t work reliably, because the user profile subscription is not always available at this time.
Is there any hook that fires right after the user is (transparently) logged in?