Auto Sign-In to Power BI through code so as the report is visible in 'Secure Embed Code' - iframe

Issue:
On several ios devices, after clicking on 'Sign-In' button within the iframe(having src as Power BI report 'Secure Embed Code'), a new window opens to sign in to Power BI and after successful sign in, the window closes. However, iframe does not get reloaded. A manual intervention to reload the page is required to view the report. This exists on several ios devices (irrespective of the browser chrome or safari).
Implementation:
We have a web application using Azure AD Authentication, in this web application, we are embedding the Power BI reports with the help of 'Secure Embed Code' in an iframe.
Current Workflow:
1) User sign in to the web application ->
2) Iframe (having secure embed code) is displayed with a Sign-In button ->
3) User clicks on 'Sign-In' button within the iframe ->
4) A new window opens for few seconds to log in to Power BI Services ->
5) This new window closes automatically after successful login to Power BI Service ->
6) Iframe reloads and report is displayed
This flow works fine for Windows and Android devices. However, for several ios devices, Step#6(Iframe reload) does not work.
I am aware of the limitation of 'Secure Embed code' as
Some browsers require you to refresh the page after sign-in, especially when using InPrivate or InCognito modes.
Refer Limitations section of link for details.
Required Functionality:
After sign-in to the application, before rendering of any iframe, a link should be provided which generates a new window and prompt user to sign in into the Power BI Services. After successful SignIn in the new window, a message should be passed to the previous window that 'signIn is successful' and the new window should be closed. Once our application receives this message 'signIn is successful', then the iframe should be rendered. This will help us resolve the issue that exists in ios devices.
Note: We do not want to use 'App Owns Data/User Owns Data' approach as these approaches require to purchase dedicated capacity for production.
Please suggest if this is possible and provide some reference as to how could we achieve this.
Or suggest if there is any other workaround to resolve the issue.
Any help will be greatly appreciated.
Thanks

Note: We do not want to use 'App Owns Data/User Owns Data' approach as these approaches require to purchase dedicated capacity for production.
No, this isn't true. You will need dedicated capacities if you use embed tokens (e.g. generated with GenerateTokenInGroup). You can embed reports with AAD tokens and keep using shared capacities (see tokenType property).
The inconvenience that you are trying to overcome comes from the way secure embedding is implemented. This is how this feature works. Microsoft didn't made it because they wanted to make it inconvenient for the users. They made it this way, because it wasn't possible or easy enough to implement it better. You have to either way for a while, until browsers changes or Microsoft updates this feature, or use proper embedding (user owns data scenario in your case).

Related

How to invoke Google/Apple Pay from a Xamarin.Forms WebView?

Is there a way to enable Google/Apple Pay to be invoked from a WebView? I'm using a payment service (similar to Stripe) that will gives me a payment URL. To finish a payment, I have to open a browser, navigate to that URL and let the user pay.
I'm using a WebView because I need to be able to intercept the browser navigation and close it when it's navigating to the return URL I've provided to the payment service. That's why I'm not opening the URL in a browser intent.
The problem is that when opened in a WebView, clicking on the Google Pay button fails to open the Google Pay overlay (where you can pick a card and pay) and the payment cannot be finished. I suspect that the WebView isn't able to invoke the Google Pay API, is there a way to enable that? If not, I'd have to switch to opening the payment URL in a browser intent (using the Xamarin.Essentials's Browser API) and I'd lose the option to intercept the browser navigation.
Thanks for any advice!
EDIT:
I've received advice from the my payment processor in the meantime. They said:
Use the Chrome Custom Tabs for Android instead of the WebView. It works similarly but also supports standard functionality (such as Google Pay). To use Apple Pay on iOS, use the SFSafariController.
I'll try that and report back here.

Why do I get downloads from the US even though my app is only available in the German Play Store?

I recently released my quiz app in the german Play Store and I get some impressions/downloads from the US which is odd since it should not be visible to the Play Store there. I am using Firebase authentication and I also see that some users authenticate but in my database they don't have an account (username, avatar etc.) which also can't be because after you login with Google you get to a page where you can choose your username and in the second you reach to this site, a user document will be automatically created, but in some cases it does not get created.
I noticed this behavior since my app was in beta testing.
Is it a normal behavior that there are some users who can see and are able to download an app that is usually only available in one country?
It can happen because google play console generates pre-launch reports for your app, so I think they use dummy accounts to login into your application. It can also happen when you submit an update to your app and it goes through a review process.

Is it possible for flutter to get the browser url when a url is launched in an in-app-browser?

I am trying to connect the FitbitAPI to my flutter-firebase application. However, whenever I authenticate my account it doesn't redirect back to my application. I used the Implicit Grant Flow since I am not working with a server to power my backend. However, I do not have a way to get the token written in the browser url. An example of this is :
https://MYFIREBASEPROJECT.firebaseapp.com/__/auth/handler#access_token=eyJhbGciOiJIUzI1NiJ9.egfhwerqwjehqwkjehkashdaadadsadybG9jIHJ3ZW123123123sdsadsaasdasdagcnBybyByc2xlIiwiZXhwIjoxNTczMjk5ODQ2LCJpYXQiOjE1NzI2OTUwNDZ9.axlEiYsVicy6l-aEbphcqZlr3bHXUxq6hV2ky5o_3qw&user_id=7SFL86&scope=social+location+weight+nutrition+activity+sleep+settings+heartrate+profile&token_type=Bearer&expires_in=604800
I would like a way for me to get the last url from an in-app web browser. The in-app-browser package I use is web_browser
With that package , no.
You could use https://pub.dev/packages/flutter_webview_plugin wich allows you to launch a webview inside your app , and have full control of it.
Or you could use your package or https://pub.dev/packages/url_launcher to launch an external browser wich you don't control, but redirect to a deeplink that opens your app and handle it with https://pub.dev/packages/uni_links
So both methods are possible
EDIT:
A brief explanation of how a deeplink works.
Most of the urls start with "http://", that tells the browser to open a webpage with the domain of the url. However, if you use other start of the url , the browser does different things. In android per example if you type whatsapp://app in your browser url and launch it, it will launch the whatsapp app. The same can be done for your app oauth. The only thing you will need to implement it is configure your android app. The brief concept can be found here , but to communicate the android app deeplink with flutter you need uni_links , they also provide a tutorial in their package page. You can find a tutorial for flutter HERE

How to change user in the appmaker editor

I created an App with the GSuite administrator account. But now when I go back I am my work user(rob) and have no access to the App I created.
If I then go to Google and switch accounts there is no issue for all other Google apps(drive, gmail etc) but Appmaker still shows me as rob.
How can I convince App Maker to work like all other Google apps and let me select the logged in user?
Most likely it happens because at this time App Maker doesn't provide users with account chooser widget like most other Google products. Here are some things to try to bypass this limitation:
use different chrome instances for better accounts separation (https://support.google.com/chrome/answer/2364824) - I would highly recommend this approach. I have about 10 different accounts and this feature saves me tons of time and gives peace of mind
use incognito window
log out from other accounts (in theory, when you open AM it will ask you to choose an account and re-login)

Facebook app - Paypal transaction within facebook?

Is it possible and if so how to do an IPN transaction within a facebook application?
I found you can not launch an IPN transaction within an iframe. I will be using facebook's iframe option for my application, so I need to figure out a way for the users to pay.
I guess it would be possible to launch a pop up with the transaction in there... but then there is the risk of pop up blockers etc.
How do developers normally receive payment?
If you are looking to do simple micropayments (such as for virtual currency in a facebook app game) you may want to consider a 3rd party API such as SocialGold (http://www.jambool.com/)
SocialGold supports an iframe option by using a signature passing method and handles a wide variety of payment types, including PayPal.
If you want to avoid the risk of a popup blocker, consider instead using the iframe within an inline dialog within your application. There are many dialog handlers, but I recommend one that relies on JQuery myself:
http://jqueryui.com/demos/dialog/

Resources