meteor-useraccounts / core

Meteor sign up and sign in templates' core functionalities
http://useraccounts.meteor.com/
MIT License
529 stars 279 forks source link

Show which login method was last used #347

Open lorensr opened 9 years ago

lorensr commented 9 years ago

Eg on Crater I see Meteor, Twitter, and password login. I don't remember which I used, it would be great if you saved which I used last in localStorage and told me. Ref: https://github.com/TelescopeJS/Telescope/issues/912#event-279729903

splendido commented 9 years ago

Hi @lorensr!

How would you see this working? Provided that you stored the last login method inside the local storage, how would you suggest the user the method she used last time?

lorensr commented 9 years ago

Currently I see screen A:

meteor button
github button
user/password form

Proposal 1 – If I last logged in on this browser with meteor, I get screen B:

meteor button
"you last logged in with meteor. to login with another account, click here [link to screen A]" 

Proposal 2 – On page load:

if last logged in with oauth
  automatically call loginWith[Service].
else
  show user/password version of screen B

I would recommend defaulting to 2 but providing a useraccounts parameter that allows an app to go with behavior 1 if they'd prefer.

splendido commented 9 years ago

...in any case we first need a package to save the last login method inside the local storage. Any idea from where to start from?

lorensr commented 9 years ago

On login:

localStorage.setItem 'previousLoginService', 'github'

and then in a template helper:

localStorage.getItem 'previousLoginService'

Is that what you meant?

splendido commented 9 years ago

I see it in two step:

any developer can then use the first package to suggest the login method based on the one used the last time.

Anyway, having a sugested login method could be something tricky to implement: it would mean to show only one oauth button or just the password form plus some link or something to show other options, and this is not so straight forward at the moment. We can consider this during the design of v2 which might have a boost in the next weeks... (note this down @Kestanous ;-) )

dandv commented 9 years ago

This is a great idea, that I've been wanting in various web apps for a long time.

Storing the last used login method seems simple enough. It won't work cross-browser (unless we use Flash cookies), but it's better than nothing.

For starters, the last login options could have an arrow pointing to it, and maybe be sorted first:

-> Google
   Twitter
   Facebook

No need to explain what the arrow does. The user will just be inclined to click on it. A tooltip on the arrow would help on mouse-enabled devices.

splendido commented 9 years ago

and what about showing only the last used login method with some link like other methods or show more? ...the arrow might be tricky to layout?

dandv commented 9 years ago

That would simplify the choices even more, but hang on, I'm watching a bunch of Lynda.com talks on Persuasive Design, Influencing behavior patterns, Harnessing Illogical Reactions and UX Information Architecture.

splendido commented 9 years ago

ok, we'll wait for your impressions then!

dandv commented 9 years ago

"One of the most fallow areas of all on the page is beneath the action buttons. Once users find an action button, they're ready to move on."