After doing this, I was able to get the app to compile and run on a simulator (After adding my own bundle ID and Okta plist).
Current behavior
When trying to logout with the Okta.Xamarin.ViewModels.SignOutCommand I noticed that the web view doesn't ever close. There is a close button that can manually be tapped, but doing so doesn't trigger the OktaContext.Current.SignOutCompleted event, so sign outs don't occur.
public Command Logout => new Okta.Xamarin.ViewModels.SignOutCommand();
Trying to work around this by calling signout directly produces the exact same behavior
public Command Logout => new Command(async () => await SignOut()); //new SignOutCommand();
private async Task SignOut()
{
await OktaContext.Current.SignOutAsync();
}
I am also able to reproduce this in my own app.
Expected behavior
Safari web view is automatically closed and the sign out event is triggered
Minimal reproduction of the problem with instructions
In attempting to work around #71 I downloaded the sample app (https://github.com/okta/samples-xamarin) and did the following changes:
After doing this, I was able to get the app to compile and run on a simulator (After adding my own bundle ID and Okta plist).
Current behavior
When trying to logout with the
Okta.Xamarin.ViewModels.SignOutCommand
I noticed that the web view doesn't ever close. There is a close button that can manually be tapped, but doing so doesn't trigger theOktaContext.Current.SignOutCompleted
event, so sign outs don't occur.Trying to work around this by calling signout directly produces the exact same behavior
I am also able to reproduce this in my own app.
Expected behavior
Safari web view is automatically closed and the sign out event is triggered
Minimal reproduction of the problem with instructions
See https://github.com/kensykora/samples-xamarin/commit/be88dea49f1e6656aa2ad591559bae845db50e62
Environment
Nuget Packages:
macOS Big Sur 11.4, Mac Mini, M1 2020 XCode 13.1
Experienced on iOS SImulator iPhone 13 running iOS 15.0
Build Environment