feat: add basis of auth
This commit is contained in:
parent
67f98735ee
commit
893b3726bb
4 changed files with 313 additions and 0 deletions
17
stores/auth.ts
Normal file
17
stores/auth.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useAuthStore = defineStore("auth", {
|
||||
state: () => ({
|
||||
accessToken: null as string | null
|
||||
}),
|
||||
getters: {
|
||||
getAccessToken: (state) => {
|
||||
return state.accessToken;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
setAccessToken(value: string) {
|
||||
this.accessToken = value;
|
||||
}
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue