mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
diable authentication
This commit is contained in:
parent
990aabfd0c
commit
a3e8ca49e5
@ -5,15 +5,5 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'App',
|
name: 'App',
|
||||||
methods: {
|
|
||||||
async readToken() {
|
|
||||||
if (window.localStorage && window.localStorage.getItem('vuex')) {
|
|
||||||
this.$store.commit('token', JSON.parse(window.localStorage.vuex).token)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.readToken()
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -21,7 +21,7 @@ import { BootstrapVue } from 'bootstrap-vue'
|
|||||||
const httpLink = new HttpLink({ uri: CONFIG.GRAPHQL_URI })
|
const httpLink = new HttpLink({ uri: CONFIG.GRAPHQL_URI })
|
||||||
|
|
||||||
const authLink = new ApolloLink((operation, forward) => {
|
const authLink = new ApolloLink((operation, forward) => {
|
||||||
const token = '' // store.state.token
|
const token = store.state.token
|
||||||
operation.setContext({
|
operation.setContext({
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: token && token.length > 0 ? `Bearer ${token}` : '',
|
Authorization: token && token.length > 0 ? `Bearer ${token}` : '',
|
||||||
|
|||||||
@ -3,9 +3,11 @@ import NotFound from '@/components/NotFoundPage.vue'
|
|||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
|
/*
|
||||||
meta: {
|
meta: {
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
},
|
},
|
||||||
{ path: '*', component: NotFound },
|
{ path: '*', component: NotFound },
|
||||||
]
|
]
|
||||||
|
|||||||
@ -12,7 +12,7 @@ export const mutations = {
|
|||||||
const store = new Vuex.Store({
|
const store = new Vuex.Store({
|
||||||
mutations,
|
mutations,
|
||||||
state: {
|
state: {
|
||||||
token: null,
|
token: 'some-token',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -8,8 +8,6 @@ services:
|
|||||||
image: gradido/frontend:development
|
image: gradido/frontend:development
|
||||||
build:
|
build:
|
||||||
target: development
|
target: development
|
||||||
networks:
|
|
||||||
- external-net
|
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV="development"
|
- NODE_ENV="development"
|
||||||
# - DEBUG=true
|
# - DEBUG=true
|
||||||
@ -27,8 +25,6 @@ services:
|
|||||||
image: gradido/admin:development
|
image: gradido/admin:development
|
||||||
build:
|
build:
|
||||||
target: development
|
target: development
|
||||||
networks:
|
|
||||||
- external-net
|
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV="development"
|
- NODE_ENV="development"
|
||||||
# - DEBUG=true
|
# - DEBUG=true
|
||||||
|
|||||||
@ -15,6 +15,7 @@ services:
|
|||||||
context: ./frontend
|
context: ./frontend
|
||||||
target: production
|
target: production
|
||||||
networks:
|
networks:
|
||||||
|
- external-net
|
||||||
- internal-net
|
- internal-net
|
||||||
ports:
|
ports:
|
||||||
- 3000:3000
|
- 3000:3000
|
||||||
@ -39,6 +40,7 @@ services:
|
|||||||
context: ./admin
|
context: ./admin
|
||||||
target: production
|
target: production
|
||||||
networks:
|
networks:
|
||||||
|
- external-net
|
||||||
- internal-net
|
- internal-net
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user