Insecure connection on localhost - laravel

I am using Laravel 7 and utilizing Laravel socialite package for the first time for authenticating with facebook.
The problem is I am on localhost and when I am redirected to facebook I am getting error saying
Facebook has detected that XYZ isn't using a secure connection to transfer information.
Until XYZ updates its security settings, you won't be able to use Facebook to log in to it.
I tried to configure my xampp to run localhost on https by following these methods
https://stackoverflow.com/a/28658969/12168002
https://www.youtube.com/watch?v=Mig9YPNiUZI
but none of them worked for me.
I watched few socialite installation videos and noticed that none of them was having secure connection but still able to authenticate user successfully.
Please highlight the actual cause of me getting this error and how can I fix this?

Related

Laravel Socialite Twitter Provider - Could not authenticate

I'm using Laravel Socialite in a project and added the Twitter Provider in order to be able to allow my users to integrate with their Twitter account. I followed the steps here https://socialiteproviders.com/Twitter/ and I'm getting the following error:
Received HTTP status code [401] with message "{"errors":[{"code":32,"message":"Could not authenticate you."}]}" when getting temporary credentials.
If I leave the TWITTER_REDIRECT_URI in my env file blank, the error goes away and the Oauth flow works exactly as it's supposed to. Is anyone else having this issue? If the TWITTER_REDIRECT_URI isn't needed why have it in the docs?

Strapi:google providers issue

I have a question regarding Providers.
I'm using Strapi in the docker with Nginx reverse proxy and I set up google provider and service.js I added URL: env("", "https://my-link.com/api"),
in the beginning, everything was working fine till I clear the browser cache. Now I'm getting an error
Grant Missing session or misconfigured provider
so when I call /connect/google/callback its fail with 302
On the Strapi website, I found this but not much clear how to debug the issue
Grant: missing session or misconfigured provider: It may be due to many things.
The redirect URL can't be built: Make sure you have set the backend URL in config/server.js: Setting up the server URL
A session/cookie/cache problem: You can try again in a private tab.
The incorrect use of a domain with ngrok: Check your urls and make sure that you use the ngrok URL instead of http://localhost:1337. Don't forget to check the backend url set in the example app at src/config.js.
Thanks in advance.

HTTPS protocal is not working using laravel 5.6 with nginx

I am using laravel 5.6 with nginx for web api purpose. But when i call https://127.0.0.1:8000/api/user
It shows "Secure Connection Failed" error message in the browser.
Secure Connection Failed
An error occurred during a connection to 127.0.0.1:8000. PR_END_OF_FILE_ERROR
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the web site owners to inform them of this problem.
Learn more…
Report errors like this to help Mozilla identify and block malicious sites
I have used middleware and forcessl. But no luck.

Facebook Socialite, Login not working as expected (redirect to website fails) - Laravel 5.6

Facebook Registration works fine and users are redirected to the website but when users try to log-in using their FB account then it does not seem to work, that is, users are not redirected to the website instead loads facebook.com .
I checked the url before facebook asks user to enter fb password and it seems like permission denied is shown as below, but not sure what does that mean?:
callback%3Ferror%3Daccess_denied%26error_code%3D200%26error_description%3DPermissions%2Berror%26error_reason%3Duser_denied
I have added https which I thought could be the cause of error but then so many websites still use fb login successfully even when they don't have SSL (https). Also, SSL (https) does not seem to resolve the issue.
I am not sure how to debug this issue because not sure what is causing this, Laravel Socialite is straight-forward. Other Socialite Login I tried for example: Google+ seems to work just fine.
Any help is appreciated.
If You would like to see any part of the code, let me know in the comment.

Unable to make it work with OAuth from AWS-EC2 but doable in localhost

I followed every instructions from this site Google Dev Console site
and my web app was working well in http://localhost. No issues.
Now I deployed the web app in the AWS-EC2 server. I also added the Javascript Origins to show my 'subdomain.domain.com'. Upon hitting the button 'Google Login' from webapp on subdomain.domain.com, the google-authentication is not working ; shows the below error, where XX.YY.ZZ.AA is my AWS EC2 instance IP;
Error: invalid_request
Permission denied to generate login hint for target domain.
Request Details
redirect_uri=storagerelay://http/XX.YY.ZZ.AA?id=auth736964
response_type=permission id_token scope=email profile openid
openid.realm=
client_id=625394219770-q0qilkfl05m2fortt25j2j63e2dn6c1r.apps.googleusercontent.com
ss_domain=http://XX.YY.ZZ.AA fetch_basic_profile=true gsiwebsdk=2
That’s all we know.
I am asking for help on how to resolve this. Is it a EC2 forward issue, because the google error is not showing my subdomain.domain.com instead EC2-ip address. or something else?

Resources