Auto Read OTP in flutter using firebase is possible? - auto

I have same problem and search a lot . But can't find exact Solution.
But I solve this problem by enabling 'Android Device Verification' API
Steps:
1:Go to the Library page in the Google APIs Console.
2:Search for, and select, the Android Device Verification API. The Android Device Verification API dashboard screen appears.
3:If the API isn't already enabled, click Enable.
4:If the Create credentials button appears, click on it to generate an API key. Otherwise, click the All API credentials drop-down list, then select the API key that's associated with your project that has enabled the Android Device Verification API.
Check this link for more information
https://developer.android.com/training/safetynet/attestation?authuser=0
The following package helps for auto reading of OTP
sms_autofill
https://pub.dev/packages/sms_autofill

This is a Similar issue for android mentioned, and Below are few work around:
You need to make sure the message you receive contains the hash of your app. Below is the right format :
123456 is your verification code for %APP_NAME%.
abc_hascode_xyz
If your SMS does not contain the hashCode at the end, you might have to shorten your app name to not more than 15 characters.
If your app is already published on Google Play, the name in the SMS will be the same as the one in the Google play store.
If you changed the name to 15 characters and the error still persists, you might have to wait for at least 24hours for the change to reflect on firebase.
if after all above it's still not resolved, please check if your receiver is well configured in the code.
check out the new GooglePlay policy on app name : Examples of common app names violations

Firebase auth with the phone automatically detects OTP in the phone itself.
But in few cases, OTP is not fetched by itself so I would like to suggest you please make a template such that OTP automatically gets detected.

Related

How to print email verification URL from Firebase Auth in Emulator?

I am using the Firebase Emulator for local testing. I have a signupUser Firebase Function that uses Firebase Auth to sign up users (and does some extra work). Both of them use the Emulator, and the issue is, this way the email verification URL does not get printed neither to the console (in which I run the Emulator) nor to the Functions Log. As a result, I cannot verify my new test users and cannot log in. Is there any other way to verify these test users' email addresses or to manually print the verification URL?
Ok, I've found it. Using the Admin SDK we can generate a verification link, that we can then console log.
import * as admin from 'firebase-admin';
admin.auth().generateEmailVerificationLink(useremail, actionCodeSettings)
Docs: https://firebase.google.com/docs/auth/admin/email-action-links#generate_email_verification_link
There is another way, more automated, so you don't need to add the admin sdk:
Here is the auth log output for a new user within the Emulator:
Then base on this documentation you can fetch the oobCodes (out of band
codes) with restAPI:
Also documentation described here

Botframework v4 - Facebook Channel - Operation returned an invalid status code 'Forbidden`

Last year I developed a chatbot with Microsoft Bot Framework that I integrated in the Facebook Messenger of a page. Everything worked fine until 16th of December (last successful log). The page is not used by a lot of people therefore the application might have worked also longer than that.
Today I tried to use the chatbot again and I did not get any response. In the Logs I just found the error message "Operation returned an invalid status code 'Forbidden`".
After a bit of Debugging I found out that the problem is sending messages back to the Facebook Messenger.
context.SendActivityAsync(...)
I did not change any configuration within my Azure Bot Channel registration recently. I am aware of the privacy changes within the Facebook API, but as I already struggle with sending a simple text response like "Hi" I assume that cannot be the problem. Also the permission scheme has changed for Facebook apps. I have the permission for "pages_messaging". Do I need another permission now? Or did I miss another change in the Facebook API?
Technical Details:
Facebook API Version v6 (tried also v9 but no change in behavior)
Chatbot based on .Net Core 2.1
Bot Builder SDK v 4.11
Any hints what I did wrong or where I can look for further information is much appreciated.
Edit: I tried to add a new page to my Facebook App and get following message:
There is a hint that a permission is missing, but I cannot find out which one I require. As I only send responses to FAQ's and if required handover to the customer service inbox I just requested the "pages_messaging" permission. Do I require any other permission now?
I found the problem. For everyone that might have the same problem:
In our case the administrator that added the Facebook pages to the application was removed from the admin permission list of the pages. After re-adding the admin permissions for the pages the bot started working again.

Uri mismatch in google sign-in oAuth

I am working on a react-native application where I need to integrate the google sign in, and after that, I need to get the list of associated youtube channels with selected email id. Somewhere I read that this youtube channel selection flow is not available on the native android library. so I have opted Web Flow. But the issue is that I want to use custom URI eg : package://scheme for this so that I can get the callback inside my app. my current URI looks like as shown below. But every time it gives an error that redirect_uri_mismatch, Even after using this link "https://links.dev.myserver.in" invalid redirect URLs in the google API console.
Please guide me how can I solve this problem.

How can i get parameters from play store download link

I am currently developing a mobile app with react-native and this app contain a invitation code.
Store download link will have a invitation code parameter.
I want to get this parameter from downloaded apps via store download link.
How can i do this on react-native ?
Thanks in advance
Use Firebase Dynamic Links
Firebase Invites makes it simple for users to send content to their friends, over both SMS and email, by ensuring that referral codes, recipe entries, or other shared content gets passed along with the invitation—no cutting-and-pasting required.
Documentation https://firebase.google.com/docs/dynamic-links/
How does it work?
You create a Dynamic Link either by using the Firebase console, using a REST API, iOS or Android Builder API, or by forming a URL by adding Dynamic Link parameters to a domain specific to your app. These parameters specify the links you want to open, depending on the user's platform and whether your app is installed.
When a user opens one of your Dynamic Links, if your app isn't yet installed, the user is sent to the Play Store / App Store to install your app (unless you specify otherwise), and your app will open. You can then retrieve the link that was passed to your app and handle the deep link as appropriate for your app.
For react-native use react-native-firebase https://www.npmjs.com/package/react-native-firebase
and
https://rnfirebase.io/docs/v5.x.x/links/reference/links

How to configure Android Push Notifications (GCM) in Appcelerator Titanium Dashboard?

I've tried to following the instructions
Configuring push services for Android devices
However, the steps mention 'Click Push Notifications on the left-side navigation' but they don't exist...
Once you've created a Google API project with GCM enabled, you need to update your application's settings page in Dashboard with the API key and sender ID you generated.
To configure Arrow for push notifications using Dashboard:
Open Dashboard and select your application from the Apps drop-down menu.
Click Push Notifications on the left-side navigation <-- MISSING.
Select the Android Push tab.
Enter the server key in the GCM API Key field and the GCM sender ID in the GCM Sender ID field.
Here's a screenshot to show what's listed...
If I look under Arrow (where I suspect it might be expecting to be listed) that's empty (I'm not using Arrow - I thought it was an alternative UI using declarative XML)...
I've checked the subscription that I'm on (Indie) and it shows that I should have the ability to send up to 1 million push notifications for free..
Does anyone know how I can associate the Appcelerator Titanium project to the GCM server key??
Also, when I looked in Googles developer console, my application (which is live on their app store) wasn't listed, so I've created a new application called 'Gcm'. The Appcelerator Titanium seemed to confirm that I needed to 'create' the application, I was just too worried to call it the same name as the live application. How does the 'Google Developer Console' Application relate to the 'Google Play' application?! - if at all?
UPDATE
I've just discovered in TiApp.xml that I can enable some 'Cloud' settings and this has unlocked the 'Push' menu - so I think all is good now, could someone confirm that this is the right thing to do and answer my related question about Google play applications v google developer console applications?
Update 2
I started to get this error
[ERROR] : GooglePlayServicesUtil: The Google Play services resources
were not found. Check your project configuration to ensure that the
resources are included.
[INFO] : CloudPush.retrieveDeviceToken error: INVALID_SENDER
I'm simply calling this to try and register for Android push notifications ...
CloudPush.retrieveDeviceToken({
success : function(e) {
console.info("CloudPush.retrieveDeviceToken success");
},
error : function(e) {
console.info("CloudPush.retrieveDeviceToken error:"+e.error);
}
});
I have tried with and without the ti.cloud module (I think it got added when I clicked the 'Enable Services' button which meant that I could see the 'Push Notifications' tab, but it seems to still be listed whether the ti.cloud module is elected or not)..
Before..
Q - How to stop the Google Play error and retrieve the device token (oddly I was getting the token before enable services.
Q - Is ti.cloud used to receive the push notification, or is ti.cloudpush sufficient for this?
Thanks for the detailed question :) Let me go into some of the things you mention and clarify what I can.
If I look under Arrow (where I suspect it might be expecting to be listed) that's empty
As you later found out you have to enable platform services for your app which will create an ArrowDB app with the same name as your app. This app will have the Push Notifications in the sidebar to configure. I've updated the guide's wordings to make clear we mean the ArrowDB app, not the Titanium app.
(I'm not using Arrow - I thought it was an alternative UI using declarative XML)...
Don't confuse Arrow with Alloy - which is the MVC framework for Titanium which indeed uses XML.
How does the 'Google Developer Console' Application relate to the 'Google Play' application?! - if at all?
It doesn't. You can even have multiple apps share the same GCM sender.
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found.
What did you use to test? A Genymotion emulator without Google Apps installed perhaps? You'll need that.
Is ti.cloud used to receive the push notification, or is ti.cloudpush sufficient for this?
ti.cloud is the module to communicate with ArrowDB, subscribe to channels etcetera. On Android you need ti.cloudpush (or as #Shawn mentioned another module) to retrieve the device token where on iOS you can use a Ti. API for that. Follow this guide for all steps.
You can ignore the Google Play Service error, but it seems your GCM Sender ID and/or API Key is wrong. Read through the tutorial and make sure you put down the right ones.
If you are using Appcelerator Cloud Service to send push notifications, you need ti.cloud to register the devices.
To get the device token and to receive push notifications, you use ti.cloudpush. There are other modules that you can use instead of ti.cloudpush.