Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library stops working after 0.0.51 for Android #38

Open
FBrambilla94 opened this issue Mar 8, 2024 · 2 comments
Open

Library stops working after 0.0.51 for Android #38

FBrambilla94 opened this issue Mar 8, 2024 · 2 comments

Comments

@FBrambilla94
Copy link

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?

@mohanajuhi166
Copy link
Collaborator

@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 ?

@FBrambilla94
Copy link
Author

FBrambilla94 commented Mar 8, 2024

My scopes currently are like this:

List 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants