I'm getting the following error message in my web browser
firebase.js:75 Uncaught Error: This domain is not authorized for OAuth
operations for your Firebase project. Edit the list of authorized
domains from the Firebase console.
I have downloaded the Firebase web app sample to my local machine, pastet the snippet from the firebase console into the .html file of the "database" sample project and enabled Google as authentication method in the console.
Removing the snippet removes the error, but than it doesn't work at all (unsuprisingly).
Also tried with the "auth" sample project.
I have noticed there is a service disruption reported by Firebase, but unsure if that is the reason.
What am I doing wrong?
for development on your computer (local) you need to be running the project from a local http server - not just from a file. ie the url needs to be something like http://localhost.... not file://.....
then you need to add "localhost" to the firebase console under auth > signin methods > OAuth redirect domains
Related
I am trying to authenticate to Google OAuth 2 via a native Mac app. I set up my app in the Google Developer Console as a Desktop application, and there is nowhere to specify a redirect_uri. As I understand it, those are only available to web applications.
But in composing my request in Swift using ASWebAuthenticationSession, my resulting authentication URL is like this (line breaks added for legibility):
https://accounts.google.com/o/oauth2/v2/auth?
client_id=******.apps.googleusercontent.com&
response_type=code&
redirect_uri=pro.cova%3A%2F&
scope=profile%2520email%2520https%3A%2F%2Fmail.google.com%2F&flowName=GeneralOAuthFlow
My app's custom URL type is pro.cova:/.
I'm getting this error from Google:
Error 400: redirect_uri_mismatch
What mismatch could be happening if there isn't one specified in the Google Developer Console?
It turns out that when building a native Mac app, you have to create "iOS" API credentials in the Google Developer Console. When setting it up, you have to specify your bundle ID like this: pro.cova
When you set the redirect_uri in your ASWebAuthenticationSession request, it must have a :/ at the end like this: redirect_uri=pro.cova:/
But the callbackURLScheme in your ASWebAuthenticationSession is without the :/ so it's just pro.cova.
I wish Google's API docs said "iOS or Mac" for the API credential options.
I am trying to hook a Xamarin project up to Google Play Services but keep receiving a SIGN_IN_REQUIRED error when calling Connect. I have read a few posts online but cannot determine what actually causes this error message.
I have setup the a game project and also setup an API with oAuth credentials. I have made sure that the same SHA key is being used in the API credentials and in the application while debugging but I am still not making any progress.
I am currently presuming that this is not a coding problem but rather something to do with the setup of the API services etc but have ran out of things to try at this point.
Firstly, to make sure your network connection is normal, you can run this demo in your network environment.developer.xamarin.com/samples/monodroid/google-services/… Donnot forget to change to clientID in string.xaml.Then , open the firebase console, find this app check the clientID if it is same with your code, and check the SHA-1 hash of your signing certificate.
I'm using Azure Log Analytics to write application logs to it, like trace and error logs and also audit logs.
I would need to be able to query this log data in my web application in a flexible way (no static searches), so I came up to their REST API, like described here:
https://dev.loganalytics.io/
For some reason the authentication for query the data is different than inserting new data to the log, which I already did successfully with building a signature using the workspace id and key.
According to the documentation when using the search API I need to register my app with their AAD service, so I tried to follow the steps described in here:
https://dev.loganalytics.io/documentation/Authorization/AAD-Setup
My log analytics registration:
Log analytics registration
So I tried to create the app registration and tried to add permissions:
App Registration
And then I want to choose "Log Analytics" in the API access - but "Log Analytics" is not listed there!
As can see in this image:
API List
Why Log Analytics is not listed here? Am I'm doing something wrong?
You need search for Log Analytics API in the "Select an API" menu, then you could see this. It is not in the default list.
I'm using Azure Mobile Apps with the .NET SDK as a backend for my iOS app. The authentication done via Facebook. Yesterday out of nowhere (no code changes either on backend or app) the authentication with Facebook failed. The login inside the iOS client app is done via
self.client?.login(withProvider:"facebook", token: ["access_token" : FBSDKAccessToken.current().tokenString] ){ (user, error) in }
By calling this function I'm getting the following result, on the client.
Error Domain=com.Microsoft.MicrosoftAzureMobile.ErrorDomain Code=-1302 "You do not have permission to view this directory or page."
By inspecting the streaming logs of Azure Mobile Apps, I found out that the backend gets an Unauthorized 401.71 return back from calling the Facebook Graph API.
Streaming Log:
Microsoft.Azure.AppService.Authentication Verbose: 0 : Received request: POST https://XXXXXXXXXX.azurewebsites.net/.auth/login/facebook
'w3wp.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'D:\Windows\Microsoft.Net\assembly\GAC_MSIL\SMDiagnostics\v4.0_4.0.0.0__b77a5c561934e089\SMDiagnostics.dll'. Skipped loading symbols.
'w3wp.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'D:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Internals\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Internals.dll'. Skipped loading symbols.
Microsoft.Azure.AppService.Authentication Verbose: 0 : Calling into external HTTP endpoint GET https://graph.facebook.com/oauth/access_token.
Microsoft.Azure.AppService.Authentication Information: 0 : Sending response: 401.71 Unauthorized
I already tried cloning the Mobile App in Azure and creating a new Facebook App, without success.
for other users affected by this issue - I will quote the official answer from the MSDN Thread
TL;DR
Hotfix applied - App Restart Required
** UPDATE 3/28/2017 ** We're in the process of rolling out a rapid hotfix for affected apps worldwide. The hotfix mechanism will require
you to restart your app backend. You can do this using the Azure
Portal, the Azure Management CLI, or the App Service Mobile Companion
app for iOS and Android. Once restarted, please verify that your
Facebook logins are working again.
West US: Hotfix applied. Please restart your app. Other Regions:
Pending
I have the same problem, it stopped working yesterday without any code change.
I have tried to call the azure azure facebook authentication from rest client.
I get the same result as from the app, 401, and no additional information.
https://appname.azurewebsites.net/.auth/login/facebook
{
"access_token": "token Obtained after athorizing with facebook",
}
I have tried calling the facebook api from a rest client and it works.
https://graph.facebook.com/oauth/access_token?client_id=APP_ID&client_secret=SECRET_APP_ID&grant_type=fb_exchange_token&fb_exchange_token=ACCESS_TOKEN
My guess is that they changed something in azure web apps and broke the facebook authentification.
Please let me know if you find any solution.
This should be rolled out now. If you have any further questions see the MSDN thread from above: https://social.msdn.microsoft.com/Forums/azure/en-US/397f6952-57bf-4c28-b383-6bba08d28f9a/facebook-login-failures-with-app-service-authentication-authorization?forum=windowsazurewebsitespreview
I am trying to test locally the WP iOS app and I have a problem with login in.
I have a created an app at developer.wordpress.com and I have authorized it for my account via the web.
In WordPressComApi.m I have copied the app_id and secret_key that I found at developer.wordpress.com
When I build the app and try to login I get the following response:
{"error":"unsupported_grant_type","error_description":"Client cannot use \"password\" grant_type"}
Looks like you need a hosting site with wordpress to test it out. check wordpress.org out