hyperapp-is 0.1.33 → 0.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,4 +13,4 @@ export { Carousel, effect_InitCarousel } from "./animationView/carousel";
|
|
|
13
13
|
export type { ScrollMargin, MatrixState } from "./dom/utils";
|
|
14
14
|
export { getScrollMargin, getMatrixState } from "./dom/utils";
|
|
15
15
|
export type { GoogleAccountsId, GoogleTokenClient, GoogleAccountsOAuth2, GoogleAccounts, Google, GoogleAuthConfig, GoogleUser, GoogleAuthResult, GoogleScope, GetAccessTokenConfig } from "./services/google";
|
|
16
|
-
export { getGoogle, googleAuth, getAccessToken } from "./services/google";
|
|
16
|
+
export { getGoogle, googleAuth, googleLogout, getAccessToken } from "./services/google";
|
|
@@ -7,4 +7,4 @@ export { progress_easing } from "./animation/easing";
|
|
|
7
7
|
export { createUnits, createRAFProperties, effect_RAFProperties } from "./animation/properties";
|
|
8
8
|
export { Carousel, effect_InitCarousel } from "./animationView/carousel";
|
|
9
9
|
export { getScrollMargin, getMatrixState } from "./dom/utils";
|
|
10
|
-
export { getGoogle, googleAuth, getAccessToken } from "./services/google";
|
|
10
|
+
export { getGoogle, googleAuth, googleLogout, getAccessToken } from "./services/google";
|
|
@@ -7,6 +7,8 @@ export interface GoogleAccountsId {
|
|
|
7
7
|
credential: string;
|
|
8
8
|
}) => void;
|
|
9
9
|
}): void;
|
|
10
|
+
disableAutoSelect(): void;
|
|
11
|
+
cancel(): void;
|
|
10
12
|
prompt(callback?: (notification: any) => void): void;
|
|
11
13
|
}
|
|
12
14
|
export interface GoogleTokenClient {
|
|
@@ -48,6 +50,7 @@ export interface GoogleAuthResult {
|
|
|
48
50
|
user: GoogleUser;
|
|
49
51
|
}
|
|
50
52
|
export declare const googleAuth: (config: GoogleAuthConfig) => Promise<GoogleAuthResult>;
|
|
53
|
+
export declare const googleLogout: () => Promise<void>;
|
|
51
54
|
export type GoogleScope = "openid" | "email" | "profile" | "https://www.googleapis.com/auth/drive" | "https://www.googleapis.com/auth/drive.readonly" | "https://www.googleapis.com/auth/drive.file" | "https://www.googleapis.com/auth/drive.metadata.readonly" | "https://www.googleapis.com/auth/drive.appdata" | "https://www.googleapis.com/auth/calendar" | "https://www.googleapis.com/auth/calendar.readonly" | "https://www.googleapis.com/auth/calendar.events" | "https://www.googleapis.com/auth/calendar.events.readonly" | "https://www.googleapis.com/auth/gmail.readonly" | "https://www.googleapis.com/auth/gmail.modify" | "https://www.googleapis.com/auth/gmail.send" | "https://www.googleapis.com/auth/gmail.compose" | "https://www.googleapis.com/auth/gmail.labels" | "https://www.googleapis.com/auth/spreadsheets" | "https://www.googleapis.com/auth/spreadsheets.readonly" | "https://www.googleapis.com/auth/documents" | "https://www.googleapis.com/auth/documents.readonly" | "https://www.googleapis.com/auth/presentations" | "https://www.googleapis.com/auth/presentations.readonly" | "https://www.googleapis.com/auth/forms" | "https://www.googleapis.com/auth/forms.responses.readonly" | "https://www.googleapis.com/auth/youtube.readonly" | "https://www.googleapis.com/auth/youtube" | "https://www.googleapis.com/auth/youtube.upload" | "https://www.googleapis.com/auth/youtube.force-ssl" | "https://www.googleapis.com/auth/userinfo.email" | "https://www.googleapis.com/auth/userinfo.profile" | (string & {});
|
|
52
55
|
export interface GetAccessTokenConfig {
|
|
53
56
|
clientId: string;
|
|
@@ -82,6 +82,16 @@ export const googleAuth = async (config) => {
|
|
|
82
82
|
}); // end result
|
|
83
83
|
};
|
|
84
84
|
// ---------- ---------- ---------- ---------- ----------
|
|
85
|
+
// googleLogout
|
|
86
|
+
// ---------- ---------- ---------- ---------- ----------
|
|
87
|
+
export const googleLogout = async () => {
|
|
88
|
+
const google = await getGoogle();
|
|
89
|
+
// 自動ログインを無効化
|
|
90
|
+
google.accounts.id.disableAutoSelect();
|
|
91
|
+
// セッション的なものをクリア(念のため)
|
|
92
|
+
google.accounts.id.cancel();
|
|
93
|
+
};
|
|
94
|
+
// ---------- ---------- ---------- ---------- ----------
|
|
85
95
|
// getAccessToken
|
|
86
96
|
// ---------- ---------- ---------- ---------- ----------
|
|
87
97
|
export const getAccessToken = (config) => new Promise((resolve, reject) => {
|