A
A
alestro2016-09-14 08:03:20
Laravel
alestro, 2016-09-14 08:03:20

Authentication via Vk in Laravel. It should be?

I wonder how correct this approach is: First, I added the vk_id field to the Users table, according to which I plan to authenticate the user. But the standard functionality swears at the lack of a password. So, as far as I understand, in order to bypass this thing, you need a separate guard. Then implement two interfaces:

Illuminate\Contracts\Auth\Authenticatable;
Illuminate\Contracts\Auth\UserProvider;
And all that confuses me is the getAuthPassword method of the Authenticatable interface, which should return the string value of the password hash, but since the entry occurs by vk_id, the field with the password hash in the database is null. So, if you return an empty string, can there be any difficulties in the future?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2016-09-14
@alestro

https://github.com/SocialiteProviders/VKontakte

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question