mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-26 10:30:38 +00:00
- set social login credentials
- disallow registration refactoring
This commit is contained in:
Vendored
+16
@@ -105,6 +105,22 @@ const mutations = {
|
||||
STORE_REQUESTED_PLAN(state, plan) {
|
||||
state.requestedPlan = plan
|
||||
},
|
||||
SET_SOCIAL_LOGIN_CONFIGURED(state, service) {
|
||||
if (service === 'facebook') {
|
||||
state.config.allowedFacebookLogin = true
|
||||
state.config.isFacebookLoginConfigured = true
|
||||
}
|
||||
|
||||
if (service === 'google') {
|
||||
state.config.allowedGoogleLogin = true
|
||||
state.config.isGoogleLoginConfigured = true
|
||||
}
|
||||
|
||||
if (service === 'github') {
|
||||
state.config.allowedGithubLogin = true
|
||||
state.config.isGithubLoginConfigured = true
|
||||
}
|
||||
},
|
||||
SET_STRIPE_CREDENTIALS(state, data) {
|
||||
state.config.stripe_public_key = data.key
|
||||
state.config.isStripe = true
|
||||
|
||||
+5
-4
@@ -1,6 +1,8 @@
|
||||
import axios from 'axios'
|
||||
import router from '/resources/js/router'
|
||||
import Vue from 'vue'
|
||||
import {events} from "../../bus";
|
||||
import i18n from "../../i18n";
|
||||
|
||||
const defaultState = {
|
||||
permission: 'master', // master | editor | visitor
|
||||
@@ -49,13 +51,12 @@ const actions = {
|
||||
})
|
||||
},
|
||||
socialiteRedirect: ({commit}, provider) => {
|
||||
|
||||
axios
|
||||
.get(`/api/socialite/${provider}/redirect`)
|
||||
.then((response) => {
|
||||
if(response.data.url) {
|
||||
.then(response => {
|
||||
if (response.data.url) {
|
||||
window.location.href = response.data.url
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(() => this.$isSomethingWrong())
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user