vk011

vk011

Member Since 4 Years Ago

Experience Points
1,230
Total
Experience

3,770 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
2
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
1,230 XP
Dec
08
1 week ago
Activity icon

Replied to Socialite Google Works On Localhost Only

Hi, tried that, still the same.

Activity icon

Started a new Conversation Socialite Google Works On Localhost Only

Hi guys, I asked about issues with Google oauth a while back but got no answers, and made some progress in the meantime.

I have facebook and google login using socialite, facebook works but google I've only managed to get to work locally, so for example locally the url is http://dev.thesite.com and in production the url is https://thesite.com, that's the only difference, however when trying to log in with google in production i always get the invalidState exception

I managed to make some "progress" by setting the callback url to be https://www.thesite.com//login/google/callback instead of just /login/google/callback and also having www in the url in the google api console for the callback, then I don't get an error but I am redirected wrongly to /index.php and I am not really signed in.

My .htaccess files redirects all requests to https, I believe that maybe some server setting is the issue here, did you guys have any similar experiences?

Aug
23
3 months ago
Activity icon

Started a new Conversation Socalite Google Sign In Get Name

I am using Laravel and its Socialite package to log in via Facebook and Google on my comments page so that users don't have to type out their name and email.

However, I am having issues with Google (Facebook works fine).

Specifically for Google (Facebook works) I get an InvalidStateException .

However if I comment out profile in $scopes array in file '/vendor/laravel/socialite/src/Two/GoogleProvider.php`

so it looks like:

protected $scopes = [
        'openid',
        //'profile',
        'email',
    ];

Then login works, however then I don't have access to name which I really need.

Aug
10
4 months ago
Activity icon

Replied to Laravel Socalite - HandleProviderCallback Is Never Triggered

Yea I hear you, thanks for all the help.

Activity icon

Replied to Laravel Socalite - HandleProviderCallback Is Never Triggered

OK friend we're getting there.

I am not using php artisan serve, I am using wamp and I run the app on localhost:3000 with browser sync / web pack, so not sure if I need to change anything there?

Ok I changed the redirect in my services.php, and in Valid OAuth Redirect URIs I now have http://localhost:3000//login/facebook/callback ( I do read what you say, I also tried changing it to http://localhost:8000//login/facebook/callback however now I get a new error on facebook website:

Facebook has detected olja isn't using a secure connection to transfer information.

So even though I am on localhost and in development mode I get this message.

Yea I just read your last post, not sure if http will work even on localhost.

Activity icon

Replied to Laravel Socalite - HandleProviderCallback Is Never Triggered

@audunru I actually do have a redirect now, though thanks for letting me know it's the way to go, however still the problem of the method not being triggered persists.

I don't understand how am I supposed to be redirected to the callback route when facebook as you say does not connect to it. I think I might need to edit something in my facebook app or in services.php.

Please bear with me as I don't have much experience with this.

These are my routes:

Route::get('login/facebook', 'Auth\[email protected]');

Route::get('login/facebook/callback', 'Auth\[email protected]');

The actual website runs on http://localhost:3000/

In services.php I have

'facebook' => [
        'client_id' => 'myid',
        'client_secret' => 'mysecret',
        'redirect' => 'http://localhost/',
    ],

On my facebook app, I have localhost set for my App Domains (under Settings/Basic) and on that same page at the bottom I've added a website platform with site url of http://localhost:3000/

Under Products/Facebook Login/Settings , Valid OAuth Redirect URIs is empty.

Please tell me what needs changing? I tried changing my redirect in services.php to http://localhost:3000/login/facebook/callback however this gives me some error when trying to log in.

I also tried setting 'Valid OAuth Redirect URIs' to http://localhost:3000/login/facebook/callback but it won't accept it (I guess because of https)

So, my guess is I need to change my redirect in services.php and have that same redirect in Valid OAuth Redirect URIs, is that correct? If so, how do I do that on localhost? It seems to deman https for Valid OAuth Redirect URIs

Activity icon

Replied to Laravel Socalite - HandleProviderCallback Is Never Triggered

Hi, are you sure?

Yes I am testing locally, but I don't think that's the issue.I think Facebook supports local development.

I think I do get logged in. I get a "state" session variable after logging in via facebook, and also I've implemented this facebook login locally without a framework or socialite (just 2 php scripts) and it worked fine.

Activity icon

Started a new Conversation Laravel Socalite - HandleProviderCallback Is Never Triggered

I am trying to log a user in via Facebook and then use that user data to fill out the name and email in a comment form.

I am using Laravel / Socialite.

So in my LoginController I have this:

public function redirectToProvider()
    {
        return Socialite::driver('facebook')->redirect();
    }

public function handleProviderCallback(Request $request)
{
    $user = Socialite::driver('facebook')->user(); 

    $request->session()->put('user', $user);
}

By using breakpoints in both methods I came to the conclusion that the handleProviderCallback method is actually never triggered for some reason.