Why can't Firebase Emulator trigger an Flutter event for EmailVerifiedAction? - flutter

I am using Firebase Emulator to test for User Registration of my Flutter app based on the example code: https://github.com/firebase/flutterfire/blob/master/packages/firebase_ui_auth/example/lib/main.dart
The Firebase Auth emulator successfully generated the link, something like this: http://127.0.0.1:9099/emulator/action?mode=verifyEmail&lang=en&oobCode=ZJIl7jQ26ZMqribJt8zSmMvFNjL_KGv9GDK7ApDsqPwetWCkz0_gFR&apiKey=fake-api-key&continueUrl=http%3A%2F%2Flocalhost%3A50707%2F
When I paste this link to browser, the emulator switches the "Verified email?" flag for the user to true, which tells me the link is valid. However, this link redirects to Sign-in screen (/#), instead of profile page (/#/profile) which means the user is logged in and email verified. I think it's something to deal with the url of the ActionCodeSettings but I cannot manage to make it work.
Conversely, it works fine if I connect directly to Firebase server, i.e. it can verify the email and then go to the profile screen after clicking on the "Continue" button. Is this a known issue for Flutter to work with Firebase emulator?

Related

Flutter: Firebase Auth UI stuck on verification screen

I want to use the firebase_ui_auth package and i am testing with the example app in the repository. When i register a user with email and password the verify email screen is pushed and the issue i am facing is that after i click on the url to verify, the app remains in the loading state. I have connected the app to a firebase project, are there any other settings that I need to make?
Thanks in advance.

Ionic and MSAL Authentication for app opened within in app browser

I have an Ionic app that needs to authenticate using msal angular for Azure, the user is able to sign in flawlessly on the login screen that opens up in an in app browser.
I have a link to another app which uses the same token for login, so in the native devices this app opens up in another in app browser when clicked on that link, but the user is not SSO'ed into that app. But the user is SSO'ed automatically on the PWA version.
Any idea on how this can be achieved on the native devices as well? I know we need to access the token from the cookie jar but im unable to find an example/documentation of such a scenario.
Thanks in advance.

Automation framework to run both UI and mobile automation

Our use case involves automating both Web and mobile. Certain actions are carried out on Web post which the data flows to mobile device. Then certain actions need to be carried out on mobile device.
Is there an automation framework which can do both Web and mobile automation as a single flow.
I tried using Serenity with Selenium and Appium. But through the properties file, either Chrome browser or Android emulator can be launched at a single point of time.
Sample cucumber feature file usecase
Given user enters "admin" and password "admin" and clicks on login button
When user enter "Item1" as "Data1"
And user clicks submit button
Then verify success message on UI.
And verify "Data1" saved in Db.
When user launches mobile device
And user enters "admin" and password "admin" and clicks login button
Then verify "Data1" is displayed on mobile device.
When user clicks on "Item2" on mobile device
Then verify "Data1" is updated on mobile device
And verify "Data1" is updated on the Web.
I would assume that the actions in the browser actually perform REST calls to the backend, in this case I would suggest you directly call the backend endpoints instead of trying to do it in the browser and mobile application at the same time. A great framework that you can use to execute backend calls and Appium tests at the same time is Carina

How to get gmail logged in user detail using GIDSignIn after app restart in Swift iOS

I have integrated GIDSignIn in iOS swift project. I am able to login and get user detail like email using.
GIDSignIn.sharedInstance()?.currentUser?.profile.email
But when I kill and restart app GIDSignIn.sharedInstance()?.currentUser become nil. And I need to sign in silently in app to get the currentUser detail.
Is there any way to get email address of logged in user when app restart without silent sign in?

iOS: Tapping on Facebook app login does not bring up allow/don't allow options for my app

Problem:
I run the sample iOS SDK code for facebook connect. When Facebook app is not installed, the sample app authenticates through Safari just fine and the sample app is able to post successfully.
When native Facebook app is installed, the sample app causes the Facebook app to be launched for authentication which shows a page that is requesting login for the demo app. When I press the login, it brings up another window that has the allow/"don't allow" options. So far so good. The problem is that if I logout from within the sample app (i.e., [_facebook logout:self]) and try to login again, pressing the "login" button in the Facebook app does nothing (it's supposed to take you to the allow/"do not allow" page).
I have specified the App-ID in the sample app and I have included the fb[app-id] (e.g., fb1234) in the plist under 'URL Types' (otherwise, the Safari authentication would not have worked either).
Any help is appreciated.
It does not take you again to the "allow/don't allow" page because the user already gave permission to the app. The only way the page can show again is when the user revoke the access from the Facebook admin panel. I'm not sure if there's a part of the API that can actually revoke the access of the app from the iOS SDK.