byu-osl / bookout

A person-to-person library
3 stars 0 forks source link

Google Login #5

Open n8carrier opened 11 years ago

n8carrier commented 11 years ago

If a user attempts to login with a Google Acct that isn't associated with a BookOut account, the user is redirected to the join page. However, when the user selects "Sign up with Google" an account is immediately created. We should forget the permission when we discover that they don't have a BookOut account, and ask again for permission when they click to sign up.

Also, it would be helpful to pass a parameter to the front-end when rendering the join page that notifies the front-end the user attempted to login without an acct. That way the front-end can display a message, notifying the user of what happened. It could be something like passing the boolean variable "failedLogin" set to True.

pickupj commented 11 years ago

Both the login and join urls return additional values if they failed. If a user tries to login with an email that doesn't have an account, the join page is rendered with "invalid_login=True". If a user tries to join with an email that already has an account, the page is rendered with "invalid_join=True".

In regards to the login, Google handles all the permissions on their end. I will look into trying to invalidate it but it might not be possible.

On Mon, Apr 8, 2013 at 8:54 PM, Nate Carrier notifications@github.comwrote:

If a user attempts to login with a Google Acct that isn't associated with a BookOut account, the user is redirected to the join page. However, when the user selects "Sign up with Google" an account is immediately created. We should forget the permission when we discover that they don't have a BookOut account, and ask again for permission when they click to sign up.

Also, it would be helpful to pass a parameter to the front-end when rendering the join page that notifies the front-end the user attempted to login without an acct. That way the front-end can display a message, notifying the user of what happened. It could be something like passing the boolean variable "failedLogin" set to True.

— Reply to this email directly or view it on GitHubhttps://github.com/byu-osl/bookout/issues/5 .

n8carrier commented 11 years ago

I have updated this to an enhancement and detached Jessica. The front end should provide a notification (alert or modal) in either of the invalid_login cases, notifying the user of what happened and what he/she should do.

For example, if the user attempts to login with an email before having joined, he/she should receive a notification like this: "You are attempting to login with an email that is not associated with a BookOut account. Please choose an email associated with BookOut or create a new BookOut account."