Support the ongoing development of Laravel.io →
Configuration Authentication Database
Last updated 2 years ago.
0

Laravel definitely saves the credentials in the database. We can't really tell you how you would authorize an existing database because we don't know how you validated the credentials previously.

0

Thanks for your answer. I thought of a mySQL DB which already has a table "users". It contains the columns "user_name" and "password". Those should get updated manually by insert or update statements via console. The Laravel login should just check if the credentials, which were typed in by the user, are valid and direct them to a personal php file. For example userA got his credentials and types them in a form. Then he gets checked in the mySQL DB which runs on the same server. If they are valid userA has access to fileA.php. If userB logs in with his personal credentials and they are right he gets directed to fileB.php and so on.

As you can see I don't need a register or forgot password function.

Is this possible? And if yes, could you give me some input on how to actually do it? Thanks!

0

Everything you want is doable, but how is the password in your current database hashed?

0

I didn't actually implement a hash but I already thought this might be necessary. In the meantime I decided to just take an empty DB on my server and use the migrations like in the allmost every tutorial. How do I add a hash to make it secure?

0

You can use the bcrypt helper function. For example...

$hashedPassword = bcrypt($password);

If you want to authenticate users, I think the docs do a good job covering that.

http://laravel.com/docs/5.1/authentication#authenticating-users

0

Sign in to participate in this thread!

Eventy

Your banner here too?

tzizel tzizel Joined 15 Oct 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.