diable authentication

This commit is contained in:
Moriz Wahl 2021-11-17 13:26:18 +01:00
parent 990aabfd0c
commit a3e8ca49e5
6 changed files with 6 additions and 16 deletions

View File

@ -5,15 +5,5 @@
<script>
export default {
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>

View File

@ -21,7 +21,7 @@ import { BootstrapVue } from 'bootstrap-vue'
const httpLink = new HttpLink({ uri: CONFIG.GRAPHQL_URI })
const authLink = new ApolloLink((operation, forward) => {
const token = '' // store.state.token
const token = store.state.token
operation.setContext({
headers: {
Authorization: token && token.length > 0 ? `Bearer ${token}` : '',

View File

@ -3,9 +3,11 @@ import NotFound from '@/components/NotFoundPage.vue'
const routes = [
{
path: '/',
/*
meta: {
requiresAuth: true,
},
*/
},
{ path: '*', component: NotFound },
]

View File

@ -12,7 +12,7 @@ export const mutations = {
const store = new Vuex.Store({
mutations,
state: {
token: null,
token: 'some-token',
},
})

View File

@ -8,8 +8,6 @@ services:
image: gradido/frontend:development
build:
target: development
networks:
- external-net
environment:
- NODE_ENV="development"
# - DEBUG=true
@ -27,8 +25,6 @@ services:
image: gradido/admin:development
build:
target: development
networks:
- external-net
environment:
- NODE_ENV="development"
# - DEBUG=true

View File

@ -15,6 +15,7 @@ services:
context: ./frontend
target: production
networks:
- external-net
- internal-net
ports:
- 3000:3000
@ -39,6 +40,7 @@ services:
context: ./admin
target: production
networks:
- external-net
- internal-net
ports:
- 8080:8080