Laravel socialite Google login cannot create credentials for localhost server - laravel

I'm developing a laravel project with socialite. It is now in my localhost sever. During development, I want to test login/register locally. Hence, my domain is localhost.
I've created a project in google console but can't create credentials for my localhost domain.
https://console.developers.google.com/apis/credentials
When I try to add localhost to Authorized domains Google says Invalid domain: must be a top private domain. Here is a screenshot:
Is is possible to create credentials for localhost?

Related

Django sign up with facebook return an error

*as 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 sub-domains of your app to the App Domains field in your app settings.**
im using http://127.0.0.1:8000
so here is how i have set my facebook
domain App domains is 127.0.0.1
Then the url to the sign up page on django is
http://127.0.0.1:8000/user
first you need to install django ssl server then dont access with 127.0.0.1 but use localhost even though it will redirect you to 127.0.0.1 just use localhost:8000
Then on login to admin and on sites rename the domain name to localhost:8000
go to facebook development and add the following
domain name = localhost
go to add platform on bottom of the page and add website then fill this way
http://localhost:8000
HOW TO INSTALL DJANGO SSLSERVER
https://github.com/teddziuba/django-sslserver
HOPE IT WORKS😖😖

Facebook login Error: Cant load URL

I have this facebook app and I have setup my client id and secret on the code. When I try to access the api I get this error. I have tried everything. The app domain is localhost and the website url is the path that the app is running. Anyone know how to solve the issue?
This is the request:
https://www.facebook.com/v2.8/dialog/oauth?client_id=266389393769834&state=xxxxx&response_type=code&sdk=php-sdk-5.0.0&redirect_uri=http%3A%2F%2F%5B%3A%3A1%5D%2Fdemo%2F%2Fuser_authentication&scope=email
In order to test a localhost FB login setup, you cannot use their "Production" setup, as this points to an existing website, or IP
localhost, 127.0.0.1 or any alias (for example: my.domain or de.mo) you set on your localhost server will not work when the FB settings is pointing at production environment.
You need to set up a test environment using FB "Create New App"

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?

(Codelgniter) Login page is not redirecting to source page in godaddy hosting server

I have used codeigniter to develop project.In Localhost it is working fine(Redirecting Also)But after hosting in godaddy Server if I login with correct details it is showing error.But in url it is showing domainame/controller.finally same login page is showing.
I Changed settings also according to server.
it is not Connecting to database even if i change database.php(host,username,password,database name)....and iam unable to getting users details from database

How to do facebook auth through a remote proxy

Say I have an app with a Sinatra REST API at http://example.com:4567. With my app I have a designer working on the front-end. Rather than set him up with a local back-end I edit his hosts file as follows:
127.0.0.1 local.example.com
and his httpd-vhosts.conf as follows:
ProxyPass /api http://example.com:4567
ProxyPassReverse /api http://example.com:4567
so that API calls are proxied to the remote host. I then create a vhost for local.example.com in apache that maps to his local directory where our front-end repo is. This allows me to give him a remote back-end with a local front-end.
The reason for the subdomain is because we do Facebook authentication which has its restrictive domain policies for auth. We can successfully facebook auth a user and get redirected back to the app, but when attempting to get an access token get a 400 response with the message:
{"error"=>{"message"=>"Missing client_id parameter.", "type"=>"OAuthException", "code"=>101}}
I believe the client_id is correctly set as it's set in the rack:oauth:client object correctly, and the flow is identical and only fails when the domain is different. The only thought I have is that facebook might not like that the user auth's from local.example.com while the access token is requested from example.com, but my understanding is facebook will authenticate on all subdomains. I've also whitelisted local.example.com on my App.
Any insight or advice into how to accomplish this? Thanks in advance.
Turns out it wasn't a domain issue, but rather fb_graph, the open source fb api from nov, uses basic auth by default, you need to set auth to something other than ":basic" when you get the access token in order to solve this error.

Resources