Ionic 4, Azure Active Directory B2C in with Google as identity provider - ionic-framework

this topic is about the combination of Ionic 4 + Capacitor + Azure Active Directory B2C + Native Application
I am working inside an Ionic 4 project and i am using Azure Active Directory B2C as login provider.
Unfortionally, trying to add Google as login provider leads to the following problem:
https://azure.microsoft.com/de-de/blog/azure-ad-b2c-google-signin-issue/
Google does not support webviews anymore.
Is there any way to open the login mask from Azure B2C with the embedded browser and only the external Google login with an external browser? I feel like i am forced to open the whole login process with the system browser if I want to use the google login service, which is no option because of the missing option in hiding the URL bar for that external browser.
Because I need a way in open the login mask without the toolbar. The page should look like a clean login mask, so the user does not get the feeling of leaving the application.
Did anyone experience this issue before and found a way in solving it? What I want is the following behaviour:
From the native app the user should be able to open the login mask from Azure and feel like not leaving the app. So this login mask should be opened inside an webview or inapp browser because I think there is no way in manipulating the system browser to hide the URL bar.
Then, if the user decides to use the google identy provider to login, the system browser can be used, best would be inside a pop up window
I would appreciate if someone has a solution for this problem.
Best regards

Related

MSAL asks for login again (SSO) issue with flutter in iOS

Hello in my mobile application I am using the msal_mobile plugin to sign-in to an Azure AD B2C identity provider.
The problem is it asks for a login again in webview or custom tab when navigating to a website the user is already authorized to view, this is the case even if you redirect to browser but according to docs cookies are stored and SSO should work if you use ASWebAuthenticationSession or SFAuthenticationSession but it is still asking me to login.
So my questions are
is it possible to achieve SSO using webview?
is there any other way to get cookies or keep session from msal_mobile plugin & set it to system browser or browser cache
plugin : msal_mobile

Any experience with cypress-social-login using Facebook provider?

I am trying to make an automated test of the Facebook login feature in our web application in Cypress. I would like to skip the visual input of credentials and rather provide them programatically.
I came across the cypress-social-login plugin - https://www.npmjs.com/package/cypress-social-logins
Does anyone have the experience specifically with the implementation of this plugin for Facebook login? Or did anyone manage to automate Facebook login without any plugin?
Another question is: for the plugin to work, I have to provide a login url fom my application. But my application doesn´t have a specific login url. It uses a fullscreen modal that contains a Facebook login button. Is there a way to modify the plugin to deal with this?
Meanwhile I accepted this fact. But I was successful by using another much simpler approach: First I go to facebook.com and log in there. Then I open my App and click the Facebook login button. In this way I can simulate the majority of users that are already signed in.
Unfortunately, when I run the tests on Lambdatest, Facebook won´t let me sign-in and tells me that I am misusing their services by going too fast :D
For now I am left by running tests locally.

Is it possible to for an Ionic(5) Capacitor(3) application to complete an Open ID (Auth0) flow?

I am struggling to utlise the angular-auth-oidc-client to add OIDC workflows into my Ionic app (android), although I feel the issues are more Capacitor so not sure that the library is the issue. There are numerous (old) posts on Google of people who have had similar problems, so I'm trying to ascertain the current state of play. I can:
By utilising a custom android scheme in my AndroidManifest, and an 'appUrlOpen' listener in app.component my OIDC login page loads in the Chrome browser on the device, and then returns to the Ionic app and opens the correct app page. Unfortunately because I've opened the login in Chrome it hangs around in the background with the username and password populated. I've no handle to it to close it, and the Capacitor plugins don't help me here.
Alternatively, I can add my ID Provider domain into 'AllowNavigation' in capacitor.config.json. This opens my login page in the app's webview, begins the redirect on successful login but fails (hangs) because Capacitor is not loaded when it attempts Window.Capacitor.triggerevent calls.
This is probably classed as a poor question, and I appreciate that it is light on code, but I'm interested in whether anyone has actually managed to do this successfully, as there are so many dead ends on google and github of people who've given up!
Yes it is possible to complete an Open ID Flow on ionic with capacitor.
You need a capacitor plugin to do so, ionic provides an own payed plugin (https://ionic.io/docs/auth-connect), other alternatives exist.
angular-auth-oidc-client out of the box works only on browser, not on iOS or Android. It seems that some adoption can be made, see https://github.com/damienbod/angular-auth-oidc-client/issues/807.

How to solve restricted_client error in google sign in flutter IOS?

I'm trying to implement google signin in my flutter app when I click google-signin button.
when I click continue it redirects to a browser window and tells
I have enabled google sign in and place json file in correct path
can any one help?
Clicking on 'Learn More' in the error message above should take you to the Google Cloud Console configuration for your project, where you need to configure the OAuth consent screen information before you can use Google Sign In.
If you already know your Google Cloud project information, visiting https://console.developers.google.com/apis/credentials/consent will take you to the consent screen configuration.
You can find more information at https://support.google.com/googleapi/answer/6158849?hl=en.

Auto sign google account chrome app

I'm developing a kiosk chrome app, and i'm facing an issue: i can not display drive documents of my domain without sharing them publicly;
How can i auto sign a google account in a chrome app, so i could display drive documents without having to share it with anyone with a link ?
I know webviews tags doesn't have access to cookies and at this point, i have no clue..
I would like to have a "service account": foo.bar#gmail.com, with password hardcoded in the app, and be able to connect it, without any prompt.
There is no viable solution for this.