Google ClientID works for Google Sign-in platform library but not new GIS library - vue.js

I'm trying to migrate my application from the older Google Sign-In platform library to the newer Google Identity Services library.
I have a client ID that works for the old method, but when I load the "Google Sign-in" button using GIS, I get 403 errors and an error log that GSI_Logger says my origin is not allowed for the client ID. I'm on localhost, but when I use the old method, there are no issues with localhost.
The only thing I can think of being different is that I load my Google client ID as a constant and rendered the button in the mounted() section of my Vue app's Login.vue, while previously I loaded it in main.js.

"Google One Tap can only be displayed in HTTPS domains".
So, it doesn't work because localhost is HTTP. I deployed to my testing environment which is HTTPS and got no such 403 errors.
Source: https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid

Related

Azure App Service Oauth failure after Mobile Service migration

Up to this point, I had a functioning Azure Mobile Service with service-directed OAuth working nicely for Google. I tried to rehost the mobile service as an app service since mobile services are deprecated. I also have an HTML/JS web app that accesses my service through the MobileServiceClient JS client. This is where the fun starts.
After changing the redirect address to the appropriate app service address in the Google API manager, I get a message saying I'm successfully logged in in a new popup window: .
Clicking on "Return to Website" takes me to the address of my app service, not the app that initiated the OAuth request, and if I close this window, the MobileServiceClient throws a "cancelled" exception and I don't get my credentials.
What am I missing or what changed that I need to account for?
Thanks!
It turns out that this particular behavior happens when using an older version of the MobileServiceClient JS library. Replacing the 1.2.7 version with the 2.0.0beta version fixed this. To get the whole OAuth flow working, I also needed to add the appropriate addresses to the allowedExternalRedirectUrls node of the config/authsettings node through the Azure Resource Explorer. If there is a nicer way to do it than through the resource explorer, I don't know what it is.

Jhipster social login via Google

I added clientID and clientSecret (created in Google Developer console) to application.yml but I couldn't get it working. Any idea what is causing error 400. Error: redirect_uri_mismatch. I got http://127.0.0.1:8080 in Authorized JavaScript origins.
I did everything what is said in Google's tutorial, but no luck:
https://developers.google.com/identity/sign-in/web/server-side-flow#step_1_create_a_client_id_and_client_secret
You need to specify in your Google developers console the different redirect url you authorize. For you, you need to add http://127.0.0.1:8080 url.
Little tuto:
Connect to your developer console, click one the main menu
Select API management
Go to Identifiant and select your application, here JHipster
And add your url and save
Another thing that I had to do that wasn't mentioned clearly in the google developer link was to enable the Google+ API.
The various API's are accessible via the Library tab under the Dashboard.

The Google Maps API server rejected your request. This IP, Site or mobile application is not authroised to use this API key

I have implemented the Google maps iframe embed api to my website, the map API is working correctly on desktop web browsers as well as Google Chrome for mobile.
However when i attempt to view the page of my site with the API on in mobile safari on iphone i get an error saying;
"The Google Maps API server rejected your request. This IP, Site or mobile application is not authroised to use this API key".
I Have enabled Google Map API for IOS on the google developer console and the issue still hasnt gone away. As i said the API works fine on other mobile browsers.
Does any one have any suggestions how to fix this?
Thanks, Martin
Did you create a new Client ID?
Handheld devices require "Installed Application" Client ID, not "Web Application. "

Social Business Toolkit: Sametime chat only with local installed Sametime Client possible?

I'm using SBT SDK on a XPage.
After mastering a few traps at the beginning it works fine.
Livenames are properly displayed.
But now a got another problem.
If you click on a available person, a context menu is displayed, where you can choose 'CHAT' or 'VCARD'.
If I click on CHAT a URL like this ist called:
http://localhost:59449/stwebapi/loggedin?jsonp=stproxy.connect.callback.setAvailable&wait=true&time=1407834968761&fqdn=sametime.lotus.com
I found out that you have to install Sametime Connect Client locally at every computer, because it is providing a small webserver at port 59449.
That's impossible because I want to use Sametime on a public website.
I'm pretty sure that there is another way.
Somebody an idea?
thanks
Marcus
#user2776693 - There are two ways:
1 - using the Sametime Local Web API
The local web api uses a configurable port (the default is mentioned above), to communicate back and forth from a web site which embeds or calls the configurable port using jsonp, meaning the javascript of the site wraps the sametime calls.
2 - using the Sametime Web Chat/Web Proxy
It means that the Sametime Web Chat is embedded as JavaScript on the page, and loaded using the appropriate JS libraries, and can have some pretty advanced features. There is a demo site off of greenhouse.lotus.com, and you can sign up for an account on that site.
you can download the sdk, and find many examples of using the local web api and web chat.
http://www14.software.ibm.com/webapp/download/nochargesearch.jsp?q0=&k=ALL&S_TACT=104CBW71&status=Active&b=Lotus&sr=1&q=sametime+sdk&ibm-search=Search
Download Version 9.0 IFR1
Extract with Zip
Go to Examples and samples

DotNetOpenAuth redirection URL results to page not found

I have deployed a service using DotNetOpenAuth library.
The service authenticates against 4 providers (Google, Yahoo, Windows and Facebook)
I am having a problem with Windows and Facebook (Oauth protocol)
My services works fine when accessed through any browser. It redirects to the correct provider after selection, authenticates and replies back with the email address.
But the service does not work when accessed through a Mobile device. Using mobile, when I select Windows/Facebook, it redirects me to the login page. After providing my credentials, the service returns but the redirection of the url leads to page not found.
The url that is redirected seems like: http://mydomain.com/facebook.aspx?code=a_very_long_string
I get a message that page not found on the browser of the Android phone. The same code works fine when accessed through the browser of a desktop/laptop (Windows 7).
Please let me know if I am missing anything to make the service work for the mobile phone
I am able to resolve this issue. It turns out I cannot use server.Urlencode() .Net function before doing a custom redirection.
If I use it, the app breaks in the mobile platform. Removing it, fixed the issue and the url is successfully redirected.
I was doing a custom redirection after the authentication is successful and encoding the url. But seems that it breaks the application.
Not sure if it is a limitation in DotNetOpenAuth library or it is a limitation of the mobile browser.