Flutter Azure B2C - How can we use custom policies of Azure B2C (other than default signing/signout) in Flutter? - flutter

I've tried to use these libraries for use a custom policy (in my case profileManagement).
msal_mobile: ^0.1.4
azure_ad_authentication: ^1.0.4
msal_flutter: ^2.0.1
aad_oauth: ^0.1.6
But all these libraries are using common functionalities such as acquireToken,login,logout,acquireTokenInteractive,acquireTokenSilent,getAccount and so on.
However, I would like to call a custom policy. By using that policy user able to open an embedded web view and load certain things such as 1. change password , 2. update MFA option, 3. Delete account in that browser and can be perform these operations as well.Im attaching the screenshot.
Actually, I can show it in InAppWebBrowser without the help of MSAL library but when successful password change/successful MFA updation , a redirection is happening , that I can not achieve without using MSAL library.
I've checked almost all flutter libraries which supports MSAL, but there I couldn't find any solution to load a policy and resulting to load a browser. I happened to see an native android documentation in below link .
msal - native android documentation.In this doc they are mentioning about How to use Custom Policy. But Can't achieve the same in Flutter.There is no such methods.
Anyone please help me...

Related

How to add extension to apigee-emulator on local environment?

Recently we get the need for work on the same apigee proxy more than one developer. So we are trying to use the apigee-emulator to allow us to use git as version control
We already have everything setup for VScode as it says on the documentation.
The problem is with an `extension callout we have inside one of our proxies that we need to access to salesforce. When we try to push our proxies to the apigee-emulator we get this error
If we search for the callout we can see it's the one that try to access to salesforce
How can we add this extension to be used inside the apigee-emulator?
From the error it looks like you are using Apigee Edge ExtensionCallout policy.
The vscode extension and the emulator cater towards the features available in the X and hybrid versions of Apigee. More information here
The extensions feature you are using has been replaced by the Integration callout policy.
Hope that helps

Firebase performance always collecting data on Flutter when monitoring Custom URL

I am using Firebase Performance Monitoring for my Flutter app. I am using this package
dio: ^4.0.6
firebase_core: ^1.20.0
firebase_performance: ^0.8.2+1
I want to monitor the performance of network request custom URL for specific endpoints used in my app like this
It has been more than 24 hours already, but it is still collecting data, no data appears on the dashboard like the image above. what went wrong in here?
I believe I have put the correct URL, for example, my real URL is like this
https://api.myCompany.id/api/blueray/customer/profile
so I put specific custom URL in the firebase performance dashboard like this
api.myCompany.id/api/blueray/customer/profile
if I change the filter to 'All Network Request' like the image below, there is no record from our own backend/endpoint, it seems it only records the requests for some Google services.
am I missing something? I expect the data will automatically be collected by just installing that package above. do I need write some codes to populate the dashboard with data? or do I need to add native code?
I just add that package to my pubspec.yaml and run pub get, thats it

Missing Document Providers using Intent.ActionCreateDocument

When I use Intent.ActionOpenDocument as the activity the resulting picker shows all available document providers. When I use Intent.ActionCreateDocument the resulting picker shows a limited subset of document providers. Does anyone know of a method to have the Intent.ActionCreateDocument picker show all document providers?
When OneDrive app is installed it support ACTION_OPEN_DOCUMENT Intent (Android Storage Access Framework (SAF)), but unfortunately it does not support ACTION_CREATE_DOCUMENT intent from the same SAF.Thus we can implement work-around: 1st invoke ACTION_SEND and latter ACTION_OPEN_DOCUMENT.
But this means bad user experience for end user when interacting with OneDrive comparing to doing same action with Google Drive (which support both open and create intents.) As result user would need to select file twice using OneDrive and only once if he use GDrive.

Flutter - how to create a framework where i can have Debug and Prod versions where debug version has some way to choose test environment

I need to create two different versions of the app.
- debug
-prod
for debug, version i need user to select the test environment before anything else begins. i need some way to know what environment user has selected and then load API endpoints config file accordingly.
what's the best way to handle this in flutter?
I have seen in some apps that for iOS, debug options are available in app settings under the standard iOS settings menu , select the app and then see those options in there.
You might want to use Flutter Flavours. As the name suggests, you can practically make flavours of the same app based on your need - debug, test, production etc. And not only API end-points, but you can also configure everything else such as app icon, different labels on the screen etc.
As suggested in this link, you can have different main.dart file for each flavour. You can read different configuration from JSON file (such as API end-point) and rest of your app will remain same. For example, see below :
This is another helpful link.

AWS Amplify iOS SDK problem after adding REST API to Swift project

I'm having a problem after adding the AWS Amplify iOS SDK REST API to my project. I am unable to build my project due to 3 fatal compiler errors in one Amplify added file (*Client.swift under the generated-src folder), and I don't know what to do about them.
Everything was going very well with my iOS app after leveraging the Drop-in UI for authentication: I was able to sign in via my pre-existing Amazon Cognito User Pool. So, things were working.
Next step, I wanted to access a pre-existing DynamoDB table. It seems that the way to do this in an Amplify context is to add the REST API.
Following the steps in the link above, I knew Amplify was doing something I didn't want it to do by creating its own Cognito User Pool; I guess because I specified that I wanted to "Restrict API access" to authenticated users. What I expected is that I would restrict access on the basis of my already existing Cognito User Pool, not a new one.
Anyway, that is not my immediate problem.
After issuing the pod install --repo-update command, I added the new generated-src folder to my project. I thought it was curious that my awsconfiguration.json had not changed. At that point, as instructed, I attempted to build the project but was unable to do so due to those 3 errors.
/Users/xxxxx/Dev/iOS/xxxxxxxxxx/generated-src/xxxxxxxxxxxClient.swift:148:34:
Cannot assign to property: 'endpoint' is a get-only property
/Users/xxxxx/Dev/iOS/xxxxxxxxxx/generated-src/xxxxxxxxxxxClient.swift:174:13:
Value of type 'xxxxxxxxxxxClient' has no member 'invokeHTTPRequest'
/Users/xxxxx/Dev/iOS/xxxxxxxxxxx/generated-src/xxxxxxxxxxxClient.swift:195:13:
Value of type 'xxxxxxxxxxxClient' has no member 'invokeHTTPRequest'
I cannot advance to the next step (thinking it might be the reason for those errors) because the Build Settings tab for my project doesn't show an Objective-C Bridging Header category. (Yes, I presume? Until built?)
Can someone help me out?
The good developers over at AWS Amplify's iOS SDK Github repo answered my question. As a result, they are updating the REST API guide to reflect the proper order of steps.
To summarize: you must add the Objective-C bridging header path to the Build Settings for the project. It was not obvious to me where to find this setting, but they posted a screenshot showing how to find it. Filtering without choosing those explicit settings did not turn it up in my case.