From cb3f700ee814b67c6aeef00e2e8cc7cb89cc3389 Mon Sep 17 00:00:00 2001 From: glovetleong Date: Wed, 25 Aug 2021 10:00:53 +0800 Subject: [PATCH] cross login --- .../forms/CrossLoginFormComponent.vue | 65 +++++++++++++++++++ resources/assets/vue/general/mixins/guards.js | 2 +- .../accounts/cross_iframe_login.blade.php | 34 ++++++++++ routes/web.php | 3 + 4 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 resources/assets/vue/components/accounts/forms/CrossLoginFormComponent.vue create mode 100644 resources/views/pages/accounts/cross_iframe_login.blade.php diff --git a/resources/assets/vue/components/accounts/forms/CrossLoginFormComponent.vue b/resources/assets/vue/components/accounts/forms/CrossLoginFormComponent.vue new file mode 100644 index 00000000..70fd4844 --- /dev/null +++ b/resources/assets/vue/components/accounts/forms/CrossLoginFormComponent.vue @@ -0,0 +1,65 @@ + + \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/guards.js b/resources/assets/vue/general/mixins/guards.js index 18681e5d..6c840157 100644 --- a/resources/assets/vue/general/mixins/guards.js +++ b/resources/assets/vue/general/mixins/guards.js @@ -5,7 +5,7 @@ export default { (this.$store.getters.isAuthenticated && !this.isProtectedRoute()&& this.isWithTokenRoute()) ? window.location.href = this.route('dashboard') : ''; }, isProtectedRoute(){ - const unprotectedRoutes = [this.route('login'), this.route('account.email.verification')]; + const unprotectedRoutes = [this.route('login'), this.route('cross_login'), this.route('account.email.verification')]; return !unprotectedRoutes.includes(window.location.href); }, isWithTokenRoute(){ diff --git a/resources/views/pages/accounts/cross_iframe_login.blade.php b/resources/views/pages/accounts/cross_iframe_login.blade.php new file mode 100644 index 00000000..7c6b3e47 --- /dev/null +++ b/resources/views/pages/accounts/cross_iframe_login.blade.php @@ -0,0 +1,34 @@ +@extends('layouts.base_login') + +@section('inner_content') + +
+
+
+
+
+ +
+
+
+
+
+
Welcome Back
+

To get connected with us please login with your personal info

+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+@endsection \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 24507191..2c0df37e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -69,6 +69,9 @@ Route::get('/mail', function () { echo route('login'); }); +Route::get('/cross-login', function () { + return view('pages.accounts.cross_iframe_login'); +})->name('cross_login'); Route::get('/export/customers/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@export');