Ejemplo n.º 1
0
        public App(NavigationSource navigationSource = NavigationSource.Normal)
        {
            Current = this;
            InitializeComponent();

            // Create Authentication Service
            AuthenticationService = new AuthenticationService(AuthenticationSettings.Tenant, AuthenticationSettings.ClientID, AuthenticationSettings.AuthorityPolicy);
            // Add Policies to Authentication Service
            AuthenticationService.AddNamedPolicy(nameof(AuthenticationSettings.PolicySignUpSignIn), AuthenticationSettings.PolicySignUpSignIn);
            //AuthenticationService.AddNamedPolicy(nameof(AuthenticationSettings.PolicyEditProfile), AuthenticationSettings.PolicyEditProfile);
            //AuthenticationService.AddNamedPolicy(nameof(AuthenticationSettings.PolicyResetPassword), AuthenticationSettings.PolicyResetPassword);
            // Add scopes
            AuthenticationService.AddNamedScope(nameof(AuthenticationSettings.ReadScope), AuthenticationSettings.ReadScope);
            AuthenticationService.AddNamedScope(nameof(AuthenticationSettings.WriteScope), AuthenticationSettings.WriteScope);


            MainPage = new SplashScreen(navigationSource);
        }