question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] [Xamarin.Mac] GetAccountsAsync is not returning any elements on Xamarin.Mac after an authentication

See original GitHub issue

After authenticating on Xamarin.Mac, we later call GetAccountsAsync() to try and refresh a token, but are not getting any results back. I think this is because the keychain caching is not working in Xamarin.Mac.

We’re using version 4.12.0, and this is currently working on our other three Xamarin platforms: iOS/ Android and UWP.

I’ve tried to follow a similar approach to our iOS app, where we have set CFBundleURLSchemes and keychain-access-groups in the Info.plist and Entitlements.plist files, however the Mac app appears not to be storing the credentials in the same way, so this hasn’t helped so far.

Our iOS app does also use the line WithIosKeychainSecurityGroup in the PublicClientApplicationBuilder, however I’m not sure if we need an analogous approach for Mac here.

Is this a known issue specifically with Xamarin.Mac not caching the credentials after logging in, or is there a mistake/step that we’re missing to get this working on Xamarin.Mac?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
bgavrilMScommented, May 1, 2020

I have a fix for the cache extension and should be able to release a new version on Monday or so. https://github.com/AzureAD/microsoft-authentication-extensions-for-dotnet/issues/61

1reaction
bgavrilMScommented, May 27, 2020

@jmprieur @henrik-me @kalyankrishna1 - for the need to provide a default cache persistence layer on public client apps…

Read more comments on GitHub >

github_iconTop Results From Across the Web

PublicClientApplication - GetAccountsAsync() doesn't ...
I want to use SSO, so the user doesn't have to login to the app seperatly. The app is run on a Azure...
Read more >
Connection Troubleshooting for a Xamarin.iOS Build Host
This guide provides troubleshooting steps for issues that may be encountered using the new connection manager, including connectivity and ...
Read more >
Getting error installing Provisioning Profile on mac
Getting error installing Provisioning Profile on mac · I am developing iOS and Android app with Xamarin Forms in MAC. I am installing...
Read more >
Microsoft.Identity.Client.xml 4.25.0
When the user finishes authenticating, but an error occurred, ... including user Id. Some elements in UserInfo might be null if not returned...
Read more >
Troubleshooting Connecting to Xamarin Mac Agent
You have a Mac setup and Visual Studio running and you are wanting to connect to your Mac Build host but it will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found