[Bug] [Xamarin.Mac] GetAccountsAsync is not returning any elements on Xamarin.Mac after an authentication
See original GitHub issueAfter 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:
- Created 3 years ago
- Comments:13 (7 by maintainers)
Top GitHub Comments
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
@jmprieur @henrik-me @kalyankrishna1 - for the need to provide a default cache persistence layer on public client apps…