Comments (8)
Hey! Not sure what the problem could be... Could you check out this walkthrough video I put together, and see what might be different about your setup vs. what I put together?
Are you on Laravel 4 or 5?
from eloquent-oauth.
I'm on laravel 5.
I've been checking my user model and it's like the default one that laravel ships.
My problem, is when I got redirected back, system performs a select in DB
select * from oauth_identities
where provider
= ? and provider_user_id
= ? limit 1
and performs it with the data google returns, and then, tries to create the user, but with no data, because nothing is ever stored in oauth_identities
insert into users
(updated_at
, created_at
) values (?, ?)
If I catch that exception and store that info, the systems works perfectly.
Run a composer update and problem is the same:
Installing adamwathan/eloquent-oauth (dev-laravel-5 daca55b)
from eloquent-oauth.
What database are you using? I'm guessing the issue is you need to make the email
and password
columns nullable on your users
table, since creating a user through this package results in a user with no credentials (of course, since they are logging in through a separate service).
The entry to oauth_identities
is created after creating the users
entry, because the oauth_identities
table has a foreign key to the user's ID.
The first select is performed to see if the user already exists, if they don't create a new user, then save an OAuthIdentity for that new user.
from eloquent-oauth.
I see, that's exactly my problem.
Thank you very much!
from eloquent-oauth.
No prob glad I could help! :)
from eloquent-oauth.
Hello! I have a problem with using both linkedin and facebook for one user... db insert fails.. is it possible to solve it somehow?
from eloquent-oauth.
You mean using LinkedIn and Facebook for the same person and trying to make it one account? That isn't supported at the moment, maybe in the future. See this issue: #19
from eloquent-oauth.
Illuminate \ Database \ QueryException (42S02)
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel.oauth_identities' doesn't exist (SQL: select * from `oauth_identities` where `provider` = github and `provider_user_id` = 34309829 limit 1)
Previous exceptions
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel.oauth_identities' doesn't exist (42S02)``
why i'm getting this error although i've made changes in the user table email and password as nullable.
from eloquent-oauth.
Related Issues (20)
- Not catching ApplicationRejectedException when user reject facebook login HOT 3
- Add provider - Stripe [Request]
- Seems to be incompatible with Laravel 5.1 HOT 1
- Support passing custom data into the `state` param
- Provider Request: Reddit (code provided) HOT 7
- Class 'OAuth' not found HOT 2
- Add documentation for "Designing your users table"
- Rename OAuth facade HOT 2
- Support for twitter? HOT 3
- Request FACEBOOK basic data (gender, user_friends) HOT 1
- Office365 HOT 1
- Adding a 'remember' parameter to login() method HOT 1
- Retrieving The Authenticated User HOT 2
- Merging Accounts HOT 2
- Log in by access token HOT 2
- Using Google Oauth behind proxy
- Authorize more than one provider for one user HOT 1
- Running something on register HOT 1
- ΒΏIs There a way to auth sending email and password to Facebook or google?
- 'No query results for model [App\User].' 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 eloquent-oauth.