My app requires user names for each user. These are shown in the profile and also used as part of the user profile URL. I’m using the useraccounts package for login, and already set it up in a way that the username must be set on sign-up.
This works well for a form-based sign-up. But if I add the social login packages (facebook, twitter etc.), there is no standard way of asking the user to provide an additional username.
useraccounts has a postSignUpHook, but this is only called on form-based login, not on social login. There’s another hook, onSubmitHook, which is actually called if a social login takes place. So I could use this one to hook in. But I have no idea how I can a) stop the redirection to the page that should be shown after successful login, and b) get that redirect URL to forward once the user has entered a username. I could also use the standard Meteor Accounts.onLogin() hook, but here I have the same challenge to get the redirection info.
How do you deal with social logins in an app that requires usernames?