I'm setting up authentication through Firebase authentication but I'm getting an error:
Invalid App ID: CHANGE-ME
I have set up Facebook auth in my Firebase console with the app ID and secret, the same ID that my app have on the Facebook application console. I've also made the app public, turning sandbox mode off. Additionally, I've added Facebook-log on as a product on the Facebook console, and providing a OAuth redirect link from my Firebase Console.
I've also defined the App ID in strings.xml and referenced it in my application manifest file:
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
Why am I getting this error message?
Code in FirebaseUI-Android/auth/src/main/res/values/config.xml as bellow
<string name="facebook_application_id" translatable="false">CHANGE-ME<string/>
Hence Overridden the actual value in the my own application.After that it worked fine.
add a line File : string.xml
<string name="facebook_application_id" translatable="false">Actual app ID<string/>
Above change fixed my issue
It looks like firebase is looking for the string "facebook_application_id" but I think most are named "facebook_app_id" instead. I added both of these to my strings and it fixed the issue:
<string name="facebook_app_id">APP_ID</string>
<string name="facebook_application_id">APP_ID</string>
Related
I have been trying to integrate Microsoft Azure AD B2C Authentication in my react native. For this purpose, I have been using react-native-msal library. I have done all the configurations for it and followed every step from the documentation but I am getting this error:
Intent filter for: BrowserTabActivity is missing. Please make sure you have the following activity in your AndroidManifest.xml
<activity android:name="com.microsoft.identity.client.BrowserTabActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="com.checkmobileapp"
android:path="/ga0RGNYHvNM5d0SLGQfpQWAPGJ8="
android:scheme="msauth" />
</intent-filter>
</activity>
This issue is already open on github. I have tried running different solutions including restarting the server, removed cache, clean the build folder but nothing worked. I also assured that I copied the same browsertabactivity into my AndroidManifest.xml.
You manifest seems to be ok.
Check if these can narrow down the issue:
Ask the user who is authenticating to enable a browser on their device. Recommend a browser that supports custom tabs.See if ParentActivity is required in msal exception for Android to support browsers similar to this.
Please make sure the package name is correct . The package name is used for unique identification for your application.
Ex: com.companyname.applicationname
Try to moving to latest msal versions to reduce the run time exceptions or atleast gives msal exceptions .
Please make sure the redirect_uri is registered in the app configuration(msal_config.json), and also in AndroidManifest.xml to support redirection during the authorization code grant flow.
Make sure the hash signature generated is url encoded when added in redirect uri.
The format of the redirect URI is: msauth://<yourpackagename>/<base64urlencodedsignature>.
Also check if you have given the authority properly MSAL Android
Check "authorization_user_agent" value ,if it needs to be changed
If everything is configured correctly, it may be a conflict with the device you are using and we may not be sure of which device msal package is compatible .So try with latest version.
Please see msal android tested browsers
References:
You can see some troubleshooting configurations here for Xamarin
android
Also check this
In my web application i was taking GCM ids. Now to move to FCM, we added the code to get the token generated and also changed the sender id in manifest.
In our case, since we lost the old gmail id associated with our old GCM token, we are using a new account & new FCM key.
Getting the below error:
Unable to get permission to notify. Or {code:
"messaging/incorrect-gcm-sender-id", message: "Messaging: Please change
your web app manifest's '…e messaging.
(messaging/incorrect-gcm-sender-id).", stack: "FirebaseError: Messaging:
Please change your web
a…gstatic.com/firebasejs/5.9.3/firebase.js:1:29212)"} code:
"messaging/incorrect-gcm-sender-id" message: "Messaging: Please change
your web app manifest's 'gcm_sender_id' value to 'XXXXXXXXXXX' to use
Firebase messaging. (messaging/incorrect-gcm-sender-id)." stack:
"FirebaseError: Messaging: Please change your web app manifest
I think you'll need to unregister any current subscriptions and re- subscribe the user.
I am trying to create a Firebase user from AngularFire 2.0.1 (Firebase 3.0.5) using:
$createUserWithEmailAndPassword(email, password)
The api returns an error:
{"code":"auth/invalid-api-key",
"message":"Your API key is invalid, please check you have copied it correctly."}
The config for the app looks like this:
{apiKey: "my_verified_key",
authDomain: "my_verified_project_id.firebaseapp.com",
databaseURL: "https://my_verified_project_id.firebaseio.com/"}
where my_verified_key is the database secret found at
https://console.firebase.google.com/project/my_app/settings/database
my_verified_project_id is the ProjectId found at
https://console.firebase.google.com/iam-admin/settings/project?project=my_verified_project_id&consoleReturnUrl=https:%2F%2Fconsole.firebase.google.com%2Fproject%2Fmy_verified_project_id%2Fsettings%2Fgeneral%2F
In the network log I see that the error comes from a POST to
https://www.googleapis.com/identitytoolkit/v3/relyingparty/signupNewUser?key=my_verified_key
I have checked that identity toolkit api is enabled for my app.
I've tried disabling/enabling email/password authentication in the Firebase control panel as suggested elsewhere.
I have tried to create the user from the node library but it seems that most of the auth functionality is not implemented there.
Make sure you are getting the correct API Key. Go to the firebase console page:
https://firebase.corp.google.com/project//authentication/users
Click WEB SETUP on the top right corner:
The snippet provided will contain the auto generated api key for you to user.
In my react-native app on android, I get an error when I try to login with facebook using the following call,
Parse.FacebookUtils.logIn(<scope>)
This is the error I get,
{
code: undefined,
message: 'unauthorized',
line: 10800,
column: 21,
sourceURL: 'http://localhost:8081/index.android.bundleplatform=android&dev=true&hot=true&minify=false'
}
I have the initialization code as shown below,
Parse.initialize('myapp');
Parse.serverURL = `${serverURL}/parse`;
FacebookSDK.init();
Parse.FacebookUtils.init();
I am also setting the facebookAppIds as mentioned in the Readme for parse-server
The facebook login part works fine, as in the app gets access to the user profile but the user account is not created on the parse-server. I don't know if I need to use any other key for the server.
I try the vimeo oauth first step, get the authrization code, below is the browser url:
https://api.vimeo.com/oauth/authorize?response_type=code&client_id=*************&redirect_uri=************&scope=public+private+upload&state=**********
I set the scope is public private upload.
Then the web page always report me error:
An error has occurred. You won't be able to connect to Vimeo until it is fixed by the developer.
Dear app owner, we are unable to generate access tokens using one or more of the scopes you provided.
I use this and it works correctly:
https://api.vimeo.com/oauth/authorize?response_type=code&client_id=********&redirect_uri= http%3A%2F%2Fintrepidis.blogspot.co.uk%2F&scope=public%20edit%20upload&state=****
Just make sure the redirect_uri exactly matches (apart from url encoding) the Your Callback URLs section on the Vimeo developer page for your app.