Skip to content

Commit 044ed92

Browse files
TokenSecuredChallenge - login prompt won't disappear (#1580)
1 parent 5f63583 commit 044ed92

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/MAUI/Maui.Samples/Samples/Security/TokenSecuredChallenge/LoginPage.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ private void LoginButtonClicked(object sender, EventArgs e)
5151

5252
private void CancelButtonClicked(object sender, EventArgs e)
5353
{
54-
// Fire the OnCanceled event to let the calling code no the login was canceled.
54+
// Fire the OnCanceled event to let the calling code know the login was canceled.
5555
if (OnCanceled != null)
5656
{
5757
OnCanceled(this, null);

src/MAUI/Maui.Samples/Samples/Security/TokenSecuredChallenge/TokenSecuredChallenge.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,17 @@ private async void LoginInfoEntered(object sender, LoginEventArgs e)
138138
finally
139139
{
140140
// Dismiss the login controls.
141-
if (Navigation.NavigationStack.OfType<LoginPage>().Any())
141+
if (Shell.Current.Navigation.NavigationStack.OfType<LoginPage>().Any())
142142
{
143-
await Navigation.PopAsync();
143+
_ = Shell.Current.Navigation.PopAsync();
144144
}
145145
}
146146
}
147147

148148
private void LoginCanceled(object sender, EventArgs e)
149149
{
150150
// Dismiss the login controls.
151-
Navigation.PopAsync();
151+
_ = Shell.Current.Navigation.PopAsync();
152152

153153
// Cancel the task completion source task.
154154
_loginTaskCompletionSrc.TrySetCanceled();

0 commit comments

Comments
 (0)