RefererNotAllowedMapError when running locally - google-places-api

I am trying to run my project locally and connect with the google places API, but I am getting the following response:
Google Maps JavaScript API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
Your site URL to be authorized: http://localhost:8888/
I understand that it is being required for me to provide a authorization for an URL on cloud plattform, but how am I suppose to do so when running locally?

I've just experienced the same issue. It requires a credit card to be attached.

Related

Q: Google OAuth 2 Error 400: redirect_uri_mismatch but redirect uri is compliant and already registered in Google Cloud Console

I am developing a NextJS application using next-auth with Google Oauth 2 as its authentication provider. The production build is running on Heroku. When attempting to sign in on my production build, Google OAuth is giving me "Error 400: redirect_uri_mismatch". Normally this would be an easy fix, except the exact uri is already registered in Cloud Console.
.
I have also tried added many different permutations of my uri, but this did not help.
This issue not solved by 11485271 or 69151061.
Error in question:
Error 400: redirect_uri_mismatch
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy.
If you're the app developer, register the redirect URI in the Google Cloud Console.
Request Details
If you’re the app developer, make sure that these request details comply with Google policies.
redirect_uri: https://middcourses2.herokuapp.com/api/auth/callback/google
And here is a link to the list of authorized domains in GCP.
Solved! So for some reason, Google changed my Client ID and Client Secret after I already set up those env variables. Once I noticed the change and inputted the new values it worked fine.
For me, clientID was not the issue, but this was due to a trailing slash( / ).
redirect_uri must be an EXACT MATCH on the developers console.
In the Google Cloud console, I had http://localhost:8080 under the redirect URIs in the list while my code was sending http://localhost:8080/ while making the oAuth call.

Getting a 403 while connecting local bot to local WebChat client (works with Emulator though)

I am trying to connect my local webchat client to my local bot but it's throwing a 403. I tried adding localhost:3000 (port for my webchat) as a trusted origin but it still doesn't help. However, it works just fine if I use the emulator or postman (the token generation part to connect via Directline)
Here's everything I did:
Started my local bot and used ngrok to map it to an internet address.
Changed the messaging endpoint to https://xxxxx.ngrok.io/api/messages
Configured a directline channel, took the secret key and used it in my react webchat client (running on port 3000) to establish directline connection using createDirectLine from botframework-webchat and passing a token. I am hitting to this API in this format:
POST https://directline.botframework.com/v3/directline/tokens/generate
Authorization: Bearer SECRET
After this point the console throws an error 403 and doesn't allow me to proceed further. However, I am able to generate the token through postman and the same ngrok URL works great with the bot framework emulator.
Please help me understand what I am doing wrong. I spent a good part of my day researching on getting till this step and would really appreciate an input from the experts.
Thank you.
works great with the bot framework emulator
When you are testing with Emulator, are you using a username/password, or is it blank? Make sure the MicrosoftAppID and MicrosoftAppPassword are configured in the bot when running locally and you are using NGROK to go through channels.

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?

Houndify: Web SDK Sample: signed token rejected

I've been away from coding for a few years so excuse the simple nature of this question. I've downloaded the Houndify web sdk and followed instructions to get it running on my local web server (localhost). When running it I get the authentication error "signed token rejected". I've updated the config.json and index.html with my client ID and Key. Any ideas?
E W
Can you check:
if you have activated your account by clicking the link in the email
test the request from the API console from the Client dashboard page
I have had the same error and realized that my account was not activated.

Securesocial with Twitter and Playframework 2.0 on Heroku

I have sucesfully installed securesocial in my play 2 app and I have it working for google and facebook. But i am having an issue with twitter
My conf file has the following
#
# Twitter
#
securesocial.twitter.requestTokenURL=https://twitter.com/oauth/request_token
securesocial.twitter.accessTokenURL=https://twitter.com/oauth/access_token
securesocial.twitter.authorizationURL=https://twitter.com/oauth/authenticate
securesocial.twitter.consumerKey=mykey
securesocial.twitter.consumerSecret=mysecret
but I am getting the following exception.
securesocial.provider.AuthenticationException: Authorization failed (server replied with a 401). This can happen if the consumer key was not correct or the signatures did not match.
My key and secret are the same as they are on my twitter API account app that I have created for this app. I have also included the website and the #anywhere domain from where this request is being called from.
Any ideas?
Make sure the time in your computer is properly set. Twitter will return that error if the local time in your computer is out of some offset compared to the time in their servers. Hope this helps.

Resources