Library stops working after 0.0.51 for Android
Good evening,
I was using the 0.0.51 version and it works fine on Android. To make it work on iOS I had to upgrade it but now the same stopped working on Android.
After some tests I noticed iOS starts working after version 0.0.53 while Andrid stops working after 0.0.51
My implementation is pretty much linear
return ADB2CEmbedWebView( loadingReplacement: const Loading(), optionalParameters: const [], tenantBaseUrl: aadB2CUserAuthFlow, userFlowName: aadB2CUserFlowName, clientId: aadB2CClientID, redirectUrl: aadB2CRedirectURL, onRedirect: (context) => Loading.modalLoading(), scopes: aadB2CScopes, onAnyTokenRetrieved: (Token anyToken) { ... }, onIDToken: (Token token) { ... }, onAccessToken: (Token token) { ... }, onRefreshToken: (Token token) { ... }, );
Debugging inside the library the errors seems to be the following:
Response ({"error":"invalid_request","error_description":"AADB2C90117: The scope 'openid%20offline_access%20profile%20https://myWebSite.onmicrosoft.com/exm.be.webapi/access_as_user' provided in the request is not supported.\r\nCorrelation ID: 53dc1c3f-a814-428c-8adf-a3153d5eb8b3\r\nTimestamp: 2024-03-07 13:24:06Z\r\n"})
It's strange the scopes are the problem, because on iOS the login is working fine and on Android it's working until 0.0.52
Do I have to modify something when upgrading over 0.0.51 for Android to work?
@FabioBrambillaBeta80 the only change for IOS recently was https://github.com/microsoft/aad_b2c_webview/pull/25/files can you try with scopes=open id offline_access once and let me know if you face an error ?
My scopes currently are like this:
List<String> aadB2CScopes = [ 'https://$aadB2TenantName.onmicrosoft.com/xyz.ab.webapi/access_as_user', 'openid', 'profile', 'offline_access', ];
I've tried with just 'offline_access', and 'openid' but I still get the same incorrect behaviour. The problem occurs only on Android and only after 0.0.51