Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook Provider doesn't work with HTTPS #27

Closed
clementloridan opened this issue Jun 10, 2018 · 7 comments
Closed

Facebook Provider doesn't work with HTTPS #27

clementloridan opened this issue Jun 10, 2018 · 7 comments
Assignees

Comments

@clementloridan
Copy link

clementloridan commented Jun 10, 2018

Node.js version: v8.9.4

npm version: 5.6.0

Strapi version: 3.0.0-alpha.12.2

Operating system: OSX 10.12.6

I have a problem with Facebook Provider:

I use login-react example (localhost:3000) and my API Strapi (https://api.myexample.com in local).
I use https in local because Facebook developer doesn't accept URI url is not https

But the redirect is incorrect : http://localhost:3000/auth/facebook/callback?access_token=...

I think that redirect would be : /auth/facebook/callback?code=...

I change this in Auth.js (users-permissions)

server: {
        protocol: 'https',
        host: 'myexample.com'
      }

I don't know why ... Help please

Thk

PS: Not working with other Provider.

@soupette
Copy link
Contributor

@clementloridan can you follow these steps to enable FB.

I tried on Monday and it was working (even without https).

Also the redirect URL should be http://localhost:3000/connect/facebook

and one Facebook side http://localhost:1337/connect/facebook/callback

@worapolburaphan
Copy link

@soupette But it wasn't working for me now. I think because FB has force https now.
I can't use this URL
http://localhost:3000/connect/facebook
http://localhost:1337/connect/facebook/callback

I was very hard tried for this but It not working

@soupette
Copy link
Contributor

@xeastcrast can you try with this steps?

@worapolburaphan
Copy link

@soupette Yes i tried

@soupette
Copy link
Contributor

Is it working?

@worapolburaphan
Copy link

@soupette No I can't save this url http://localhost:3000/connect/facebook
http://localhost:1337/connect/facebook/callback

facebook warning me that "only support https url"

@eugenio10cervantes
Copy link

i just changed the proxy config in /config/environments/production/server.json... looks like this

{
"host": "mystrapidomain.com",
"production": true,
"proxy": {
"enabled": true,
"host": "mystrapidomain.com",
"ssl": true
},
"cron": {
"enabled": false
},
"admin": {
"autoOpen": false
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants