Вопрос

I have a well functioning login system right now. Im in the process of implementing Google+ and Facebook login too. Its works fine. But:

  1. When a user logs in via Facebook or Google shall I create a new user in my web apps users database? If so, what should i fill as password?

  2. Lets say a user has logged in via Facebook and he inserts a new book in the books table. What shall I put in the creator column of the inserted row? Usually I put the user id of the logged in user which has a row in the users table.

  3. A user doesnt have an account on my web app. He signs in for the first time using Google+. What happens to that user if he later on chooses to remove my site from his connected accounts on google? This might be related to the first question.

Thank you. The Documentation of the both API are really great and understandable. But I could find answers to my questions.

Это было полезно?

Решение

It's technically possible to use Google+ Sign-In without data persistence. As an example, you can see client-side-only Google+ Sign-In features on the Is Too Cute demo site.

There are certain benefits to adding data persistence and managing your own set of users but there is still a ton of great functionality you can get without needing to implement a data store:

  • Over-the-air Android installs
  • Interactive Posts
  • Personalize the site to the user
  • Access Google APIs while the user is actively browsing your site.
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top