Microsoft Login
This commit is contained in:
parent
13fd5e24c8
commit
9836c6064f
|
|
@ -2,16 +2,13 @@
|
|||
import 'dart:async';
|
||||
|
||||
// Flutter imports:
|
||||
import 'package:aad_oauth/model/config.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:msal_js/msal_js.dart';
|
||||
|
||||
// Package imports:
|
||||
import 'package:flutter_redux/flutter_redux.dart';
|
||||
import 'package:invoiceninja_flutter/main_app.dart';
|
||||
import 'package:redux/redux.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:aad_oauth/aad_oauth.dart';
|
||||
|
||||
// Project imports:
|
||||
import 'package:invoiceninja_flutter/constants.dart';
|
||||
|
|
@ -110,16 +107,6 @@ class LoginVM {
|
|||
final Function(BuildContext, Completer<Null> completer)
|
||||
onMicrosoftSignUpPressed;
|
||||
|
||||
static final Config config = Config(
|
||||
tenant: '3196aaac-9636-4f91-8f04-3297e2654909',
|
||||
clientId: '1023b9ce-5b09-4f04-98f8-e1ed85a72332',
|
||||
scope: 'openid profile offline_access',
|
||||
redirectUri: 'https://invoicing.co/auth/microsoft',
|
||||
//redirectUri: kIsWeb ? 'http://localhost:8483' : 'https://login.live.com/oauth20_desktop.srf',
|
||||
navigatorKey: navigatorKey,
|
||||
);
|
||||
static final AadOAuth oauth = AadOAuth(config);
|
||||
|
||||
static LoginVM fromStore(Store<AppState> store) {
|
||||
void _handleLogin({BuildContext context, bool isSignUp = false}) {
|
||||
final layout = calculateLayout(context);
|
||||
|
|
|
|||
|
|
@ -6,15 +6,11 @@
|
|||
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
|
||||
#include <printing/printing_plugin.h>
|
||||
#include <sentry_flutter/sentry_flutter_plugin.h>
|
||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||
|
||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
|
||||
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
|
||||
g_autoptr(FlPluginRegistrar) printing_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "PrintingPlugin");
|
||||
printing_plugin_register_with_registrar(printing_registrar);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
#
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
flutter_secure_storage_linux
|
||||
printing
|
||||
sentry_flutter
|
||||
url_launcher_linux
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import flutter_secure_storage_macos
|
||||
import package_info
|
||||
import package_info_plus_macos
|
||||
import path_provider_macos
|
||||
|
|
@ -16,7 +15,6 @@ import sqflite
|
|||
import url_launcher_macos
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
FlutterSecureStorageMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStorageMacosPlugin"))
|
||||
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
|
||||
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
|
||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||
|
|
|
|||
49
pubspec.lock
49
pubspec.lock
|
|
@ -8,13 +8,6 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "31.0.0"
|
||||
aad_oauth:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: aad_oauth
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.4.0"
|
||||
analyzer:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -387,48 +380,6 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.8.2"
|
||||
flutter_secure_storage:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.0.2"
|
||||
flutter_secure_storage_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_linux
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
flutter_secure_storage_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_macos
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
flutter_secure_storage_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
flutter_secure_storage_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
flutter_secure_storage_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_windows
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
flutter_slidable:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ dependencies:
|
|||
html2md: ^1.2.5
|
||||
printing: ^5.8.0
|
||||
image_cropper: ^2.0.2
|
||||
aad_oauth: ^0.4.0
|
||||
msal_js: ^2.14.0
|
||||
# bitsdojo_window: ^0.1.2
|
||||
# quick_actions: ^0.2.1
|
||||
|
|
|
|||
|
|
@ -6,14 +6,11 @@
|
|||
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
|
||||
#include <printing/printing_plugin.h>
|
||||
#include <sentry_flutter/sentry_flutter_plugin.h>
|
||||
#include <url_launcher_windows/url_launcher_windows.h>
|
||||
|
||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
|
||||
PrintingPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("PrintingPlugin"));
|
||||
SentryFlutterPluginRegisterWithRegistrar(
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
#
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
flutter_secure_storage_windows
|
||||
printing
|
||||
sentry_flutter
|
||||
url_launcher_windows
|
||||
|
|
|
|||
Loading…
Reference in New Issue