How should I set Facebook app domains when I'm using cloud9 IDE?

victorf

I'm using Laravel 5.6 + Socialite to implement a login flow using Facebook. I'm also using cloud9 to help me to develop it.

I followed many tutorials, but this red message is still appearing when I try to login through my development environment:

Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.

Something is missing. It seems to be a Facebook settings problem and I think my Cloud9 URLs may be causing it. Maybe C9 URLs are blacklisted, but I didn't find any official confirmation about it here or in other places.

Here my current "Facebook For Developers" settings:

My Controller (app/Http/Controllers/SocialAuthFacebookController.php):

<?php

namespace Zyga\Http\Controllers;
use Socialite;

class SocialAuthFacebookController extends Controller
{
    public function handleProviderCallback()
    {
        return Socialite::driver('facebook')->user();
    }

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

config/services.php:

'facebook' => [
    'client_id' => 'blablabla1',
    'client_secret' => 'blablabla2',
    'redirect' => 'https://myapp-myusername.c9users.io/login/facebook/callback',
],

routes (web.php):

Route::get('login/facebook', 'SocialAuthFacebookController@redirectToProvider');
Route::get('login/facebook/callback', 'SocialAuthFacebookController@handleProviderCallback');

Added alias and provider config/app.php:

'providers' => [
    // ...
    Laravel\Socialite\SocialiteServiceProvider::class,
],
'aliases' => [
    // ...
     'Socialite' => Laravel\Socialite\Facades\Socialite::class,
],

And my login button:

<a href="{{url('/login/facebook')}}">Login with Facebook</a>

EDIT

After I save http://myapp-myusername.c9users.io/ it appears without "http".

enter image description here

Any suggestion? Should I check anything else? I know we can find other similar questions here, but they seem outdated, because Facebook dev dashboard now offers different settings.

victorf

It was a Facebook settings problem.

You need to "Add Product", follow the wizard, then in Settings include all your redirect and callback URLs in "Valid OAuth redirect URIs". This form only appears after your "Add Product".

It works perfectly in Cloud9 and you don't need to set ports or so.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How do I hide the names of collaborators when coding in the Cloud9 IDE?

From Dev

How do I get phpunit to work in cloud9 IDE?

From Dev

How to install the searchkick gem when using cloud9 online IDE

From Dev

I am unable to install Rails on Cloud9 IDE

From Dev

When using WiX, what should I supply for INSTALLDIR if I'm installing a Windows exe and a Web App?

From Dev

How Does a Facebook Widget Installed on Different Domains Know I'm Logged into Facebook.com?

From Dev

Should I be using Facebook user IDs inside my app?

From Dev

How to recognize if I'm using Facebook Canvas or Website version of Facebook App

From Dev

How should I correctly request permission for my Facebook app?

From Dev

How should I identify a user registered using Facebook login?

From Dev

How can I export a MySQL Database from Cloud9?

From Dev

How do I get Cloud9 to accept a "global" variable?

From Dev

How can I put multiple commands in cloud9 runner?

From Dev

typescript and cloud9 ide how to?

From Dev

How to use http in cloud9 ide?

From Dev

How should I set _auth in .npmrc when using a Nexus https npm registry proxy?

From Dev

SyntaxError at Cloud9 IDE? Is this a bug or did I do something wrong?

From Dev

How should I correctly set contentInset for UITextView when Keyboard appears

From Dev

When should I be using `sparse`?

From Dev

How to tell which facebook version API i'm using in php

From Dev

How to tell which facebook version API i'm using in php

From Dev

How to test wildcard sub domains within cloud-9 ide

From Dev

How can i set configuration string in App Service when using Geo-Replication in Azure?

From Dev

Android Activity appears on top when I'm using another app

From Dev

When should I set TTL index in MongoDB?

From Dev

When should I set class path?

From Dev

When should I set class path?

From Dev

When should I set TTL index in MongoDB?

From Dev

How should I define interfaces of documents when using Typescript and Mongodb?

Related Related

  1. 1

    How do I hide the names of collaborators when coding in the Cloud9 IDE?

  2. 2

    How do I get phpunit to work in cloud9 IDE?

  3. 3

    How to install the searchkick gem when using cloud9 online IDE

  4. 4

    I am unable to install Rails on Cloud9 IDE

  5. 5

    When using WiX, what should I supply for INSTALLDIR if I'm installing a Windows exe and a Web App?

  6. 6

    How Does a Facebook Widget Installed on Different Domains Know I'm Logged into Facebook.com?

  7. 7

    Should I be using Facebook user IDs inside my app?

  8. 8

    How to recognize if I'm using Facebook Canvas or Website version of Facebook App

  9. 9

    How should I correctly request permission for my Facebook app?

  10. 10

    How should I identify a user registered using Facebook login?

  11. 11

    How can I export a MySQL Database from Cloud9?

  12. 12

    How do I get Cloud9 to accept a "global" variable?

  13. 13

    How can I put multiple commands in cloud9 runner?

  14. 14

    typescript and cloud9 ide how to?

  15. 15

    How to use http in cloud9 ide?

  16. 16

    How should I set _auth in .npmrc when using a Nexus https npm registry proxy?

  17. 17

    SyntaxError at Cloud9 IDE? Is this a bug or did I do something wrong?

  18. 18

    How should I correctly set contentInset for UITextView when Keyboard appears

  19. 19

    When should I be using `sparse`?

  20. 20

    How to tell which facebook version API i'm using in php

  21. 21

    How to tell which facebook version API i'm using in php

  22. 22

    How to test wildcard sub domains within cloud-9 ide

  23. 23

    How can i set configuration string in App Service when using Geo-Replication in Azure?

  24. 24

    Android Activity appears on top when I'm using another app

  25. 25

    When should I set TTL index in MongoDB?

  26. 26

    When should I set class path?

  27. 27

    When should I set class path?

  28. 28

    When should I set TTL index in MongoDB?

  29. 29

    How should I define interfaces of documents when using Typescript and Mongodb?

HotTag

Archive