Replies: 3 comments 7 replies
-
Hey! Thank you for all of the additional information here! I will look into this and keep you posted! |
Beta Was this translation helpful? Give feedback.
-
Hey @bobbyiliev For some strange reason, when trying to access the If you please explained which is the Controller or closure that is responsible with handling requests to Otherwise, if you suspect anything that may cause my staging/production server enviroment to differ from my local Wave installation, please share your thoughts. Thank you so much. /Daniel LE: the |
Beta Was this translation helpful? Give feedback.
-
Hey @bobbyiliev, As I wrote on the DevDojo discussion topic, I decided to move on and focus on more important tasks of building with Wave, because I couldn't make social auth work, not even on an out-of-the-box Wave project. Once again, many thanks for your help and efforts, they're greatly appreciated! |
Beta Was this translation helpful? Give feedback.
-
As per the problem described in more detail on DevDojo, I have been trying to figure out what's preventing me from successfully make the social provider authentication functionality work. After digging deeper into the codebase, I ended up overriding the following:
vendor/devdojo/auth/src/Models/SocialProvider.php
,vendor/devdojo/auth/src/Models/SocialProviderUser.php
,vendor/devdojo/auth/src/Http/Controllers/SocialController.php
, andvendor/devdojo/auth/routes/web.php
.By debugging the private
createSocialProviderUser()
method of theSocialController.php
Controller, I realized the following:$user
object along with itsid
,name
,email
,avatar
,user
,token
, andexpiresIn
properties and their corresponding values from Facebook;$driver
parameter of thecreateSocialProviderUser()
method is correctly received asfacebook
;$user->socialProviders()->create()
call somehow fails, despite the fact that:'provider_slug' => $driver
// 'facebook''provider_user_id' => $socialiteUser->getId()
// '9002[...]40[...]'
'nickname' => $socialiteUser->getNickname()
// null
'name' => $socialiteUser->getName()
// 'John Doe'
'email' => $socialiteUser->getEmail()
// '[email protected]'
'avatar' => $socialiteUser->getAvatar()
// 'https://graph.facebook.com/v3.3/9002[...]40[...]/picture'
'provider_data'
// {"name":"John Doe","email":"[email protected]","id":"9002[...]40[...]"}
'token' => $socialiteUser->token
// 'EAAPoOafsNc4BOZBnOaV6fDf4nMrSeQn7[...]'
'refresh_token' => $socialiteUser->refreshToken
null
token_expires_at' => $socialiteUser->expiresIn ? now()->addSeconds($socialiteUser->expiresIn) : null
// 'Formatted: 2025-01-17 21:15:59 | Timezone: Europe/Copenhagen | Timestamp: 1737144959'
For some reason, the user doesn't get created, despite all the valid data as I mentioned above. Could one or both
null
values prevent the user from being persisted?That is where I got stuck. Any help will be greatly appreicated.
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions