public LoginWithGooglePageViewModel(
            IGoogleAuthenticationService googleAuthenticationService,
            IClientService clientService,
            IPageNavigator pageNavigator)
        {
            _googleAuthenticationService = googleAuthenticationService;
            _clientService = clientService;
            _pageNavigator = pageNavigator;

            InitCommands();

            PageUrl = _googleAuthenticationService.GetAuthenticationPageUrl();
        }
Exemplo n.º 2
0
        public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
        {
            Xamarin.Forms.Forms.Init();
            _service = CrossGoogleAuth.Current;
            Dictionary <string, object> googleSignInConfig = new Dictionary <string, object> {
                { "clientId", "" },
                { "scope", "https://www.googleapis.com/auth/userinfo.profile" }
            };

            _service.Init(googleSignInConfig);
            _service.SetAuthenticationCallbacks(this);

            LoadApplication(new App());
            return(base.FinishedLaunching(uiApplication, launchOptions));
        }
Exemplo n.º 3
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            Xamarin.Forms.Forms.Init(this, bundle);
            _service = CrossGoogleAuth.Current;
            Dictionary <string, object> googleSignInConfig = new Dictionary <string, object> {
                { "clientId", "" },
                { "context", this },
            };

            _service.Init(googleSignInConfig);
            _service.SetAuthenticationCallbacks(this);

            LoadApplication(new App());
        }