Comments (6)
Assuming this issue has been resolved. Closing.
from wordpress-auth-driver-laravel.
If I read it correctly, its Wordpress Auth integration into LARAVEL project, not the other way round.
from wordpress-auth-driver-laravel.
@ahsankhatri it is use the wordpress auth information (its pulling that data from the WP database) to allow you to use that same auth information to login to your laravel project. I just find it odd that it only pulls the email/password and forces you to use the email address in WP versus the actual username in WP that it could easily use instead. Get what I mean?
from wordpress-auth-driver-laravel.
You can pass your field name as key in input array, So if you want to authenticate via username and password use following procedure:
Auth::guard('wordpress')->attempt([
'user_login' => 'johnny',
'user_pass' => 'quickbrownfox'
]);
from wordpress-auth-driver-laravel.
Ah, i see where the confusion is. I setup the guard as the default in auth.php so i can use it to simply work as the general auth system for the laravel project. So in config/auth.php, i have:
'defaults' => [
'guard' => 'wordpress',
'passwords' => 'wordpress',
],
and then in a route, im using:
Route::get('/sync_series', 'SyncController@sync_series')->middleware('auth');
from wordpress-auth-driver-laravel.
Alright, for that you first need to publish config file via:
php artisan vendor:publish --provider="MrShan0\WordpressAuth\WordpressAuthServiceProvider"
And make changes in config/wordpress-auth.php
wtih email_column to user_login
'email_column' => 'user_login',
Most importantly, make sure you've used <input name="email">
in your login page, that will override authentication criteria with user_login
as specified in auth file. Because Laravel uses default field email for authentication.
from wordpress-auth-driver-laravel.
Related Issues (14)
- No available to use with Laravel 5.6 HOT 3
- Support for Laravel 6 HOT 1
- Laravel 7.9+
- Support for PHP8
- L8 looking for email not user_email HOT 7
- Wordpress Logged User get details
- Separate WP database HOT 1
- getNameAttribute HOT 1
- Support 5.8? HOT 2
- Support for Laravel 5.8.* HOT 1
- How can i set `user` model to `JWTSubject ` HOT 1
- How can i get data from usermeta table wordpress HOT 1
- How to upgrade laravel 6.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordpress-auth-driver-laravel.