릴리스: v1.4.45 이메일 인증 및 비밀번호 재설정 추가
This commit is contained in:
@@ -30,16 +30,28 @@ export const useAuthStore = defineStore('auth', {
|
||||
return refreshPromise
|
||||
},
|
||||
async signup(email, nickname, password) {
|
||||
const user = await api.signup({ email, nickname, password })
|
||||
this.user = user
|
||||
const data = await api.signup({ email, nickname, password })
|
||||
this.user = data?.user || null
|
||||
this.hydrated = true
|
||||
return user
|
||||
return data
|
||||
},
|
||||
async login(email, password) {
|
||||
const user = await api.login({ email, password })
|
||||
this.user = user
|
||||
const data = await api.login({ email, password })
|
||||
this.user = data?.user || null
|
||||
this.hydrated = true
|
||||
return user
|
||||
return data?.user || null
|
||||
},
|
||||
async verifyEmail(token) {
|
||||
const data = await api.verifyEmail({ token })
|
||||
this.user = data?.user || null
|
||||
this.hydrated = true
|
||||
return this.user
|
||||
},
|
||||
async confirmPasswordReset(token, password) {
|
||||
const data = await api.confirmPasswordReset({ token, password })
|
||||
this.user = data?.user || null
|
||||
this.hydrated = true
|
||||
return this.user
|
||||
},
|
||||
async logout() {
|
||||
await api.logout()
|
||||
|
||||
Reference in New Issue
Block a user