Laravel Socialite HTTPS Twitter Avatar
I am using laravel 5.0 and utlising the socialite extension to enable twitter login. I encountered a problem with the retrieval of the users twitter profile picture.
The url for the profile picture I receive from twitter is in the following format.
This is saved to my db and shown when the user logs into their account. The problem is this image is serving over HTTP and is producing browser warnings when users are accessing their account, as not all the page content is served over HTTPS.
Is there any way to save the twitter profile picture with HTTPS compared to HTTP.
$user = User::create([ 'provider_id' => $userData->id, 'name' => $userData->name, 'username' => $userData->nickname, 'email' => $userData->email, 'avatar' => $userData->avatar, 'active' => 1, ]);
I save the user twitter data to my db as shown above and it the $userData->avatar part which is saving the HTTP url.
I can't seem to work a way around this and can't find much documentation on the issue. Any help would be appreciated.
Well, verifying this url, it seems simple
https:// for the same url works, so you can do:
$user = User::create([ 'provider_id' => $userData->id, 'name' => $userData->name, 'username' => $userData->nickname, 'email' => $userData->email, 'avatar' => str_replace('http://','https://',$userData->avatar), 'active' => 1, ]);
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?