Skip to content

Commit

Permalink
Merge pull request #167 from Azure-Samples/Sameerk-MSFT/Issue114
Browse files Browse the repository at this point in the history
Updated sample to hide iOS prompt
  • Loading branch information
SameerK-MSFT authored May 13, 2021
2 parents 580e8b2 + 16fbf1a commit 8e9eca7
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.30.1" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.31.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="3.1.3" />
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0" />
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1560" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.10" />
<PackageReference Include="Xamarin.Essentials" Version="1.5.3.2" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.30.1" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.31.0" />
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Identity.Client" Version="4.30.1" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.31.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Xamarin.Forms">
<Version>4.8.0.1560</Version>
Expand Down
2 changes: 2 additions & 0 deletions 1-Basic/UserDetailsClient/UserDetailsClient/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
HorizontalOptions="FillAndExpand" />
<Button x:Name="btnSignInSignOut"
Text="Sign in"
FontSize="Medium"
Margin="20"
Clicked="OnSignInSignOut"
VerticalOptions="End"
HorizontalOptions="FillAndExpand" />
Expand Down
9 changes: 7 additions & 2 deletions 1-Basic/UserDetailsClient/UserDetailsClient/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ async void OnSignInSignOut(object sender, EventArgs e)
{
try
{
// Hide the privacy prompt
SystemWebViewOptions systemWebViewOptions = new SystemWebViewOptions()
{ iOSHidePrivacyPrompt = true, };

authResult = await App.PCA.AcquireTokenInteractive(App.Scopes)
.WithParentActivityOrWindow(App.ParentWindow)
.ExecuteAsync();
.WithParentActivityOrWindow(App.ParentWindow)
.WithSystemWebViewOptions(systemWebViewOptions)
.ExecuteAsync();
}
catch(Exception ex2)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AsyncUsageAnalyzers" version="1.0.0-alpha003" developmentDependency="true" />
<PackageReference Include="Microsoft.Identity.Client" version="4.30.1" />
<PackageReference Include="AsyncUsageAnalyzers" version="1.0.0-alpha003" developmentDependency="true" Version="1.0.0-alpha003" />
<PackageReference Include="Microsoft.Identity.Client" version="4.31.0" Version="4.31.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1560" />
</ItemGroup>
Expand Down

0 comments on commit 8e9eca7

Please sign in to comment.