예제 #1
0
        async Task EnsureUserAuthenticated()
        {
            if (App.CurrentAthlete != null)
            {
                return;
            }

            var authPage = new AuthenticationPage();
            await Navigation.PushModalAsync(authPage);

            var success = await authPage.AttemptToAuthenticateAthlete();

            if (success)
            {
                await Navigation.PopModalAsync();
            }
        }
예제 #2
0
        public async Task EnsureUserAuthenticated()
        {
            if (Navigation == null)
            {
                throw new Exception("Navigation is null so unable to show auth form");
            }

            var authPage = new AuthenticationPage();
            await Navigation.PushModalAsync(authPage, true);

            await Task.Delay(300);

            var success = await authPage.AttemptToAuthenticateAthlete();

            if (success && Navigation.ModalStack.Count > 0)
            {
                await Navigation.PopModalAsync();
            }
        }