I am building a system where when a user is logging in for the first time using Facebook, he doesn't get to provide a password. So I try to log him in using the credentials from facebook.
Sentry::authenticate($credentials, false);
The above command always has to ask for a password. How do I log in the user without having to ask them for a password?
In Sentry you can do login from two different ways:
1) When typed a password on your login form, you tell Sentry to find the user and check the password to authenticate and login him/she at the same time:
2) When the user is authenticated by other means, like OAuth and you just need to force it to be logged on your system:
You choose one or another, you don't have to use both.
3) As third example, let's say you have an old user database and your passwords are hashed using MD5: