Skip to content

Commit a58cbf9

Browse files
committed
isLoginWithAPIKEYのstoreを追加
1 parent 66fd32e commit a58cbf9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/store/modules/user.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type AllowAccessData = {
1717
}
1818

1919
type Uid = string
20-
20+
type LoginWithAPIKEY = boolean
2121
interface User {
2222
email: Email
2323
emailVerified: EmailVerified
@@ -35,6 +35,7 @@ export class UserStore extends VuexModule implements User {
3535
emailVerified: EmailVerified = false
3636
displayName: DisplayName = ''
3737
uid: Uid = ''
38+
isLoginWithAPIKEY: LoginWithAPIKEY = false
3839

3940
public get isAuthenticated(): Promise<boolean> {
4041
return (async () => {
@@ -52,6 +53,11 @@ export class UserStore extends VuexModule implements User {
5253
this.uid = uid
5354
}
5455

56+
@mutation
57+
public setAuthModeIsAPIKEY(isLoginWithAPIKEY: LoginWithAPIKEY) {
58+
this.isLoginWithAPIKEY = isLoginWithAPIKEY
59+
}
60+
5561
@action
5662
public async login() {
5763
const user = await Auth.currentAuthenticatedUser()
@@ -82,5 +88,6 @@ export class UserStore extends VuexModule implements User {
8288
emailVerified: false,
8389
displayName: '',
8490
})
91+
this.isLoginWithAPIKEY = false
8592
}
8693
}

0 commit comments

Comments
 (0)