capacitor-native-google-one-tap-signin 6.0.0 → 6.0.2
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.
- package/README.md +4 -0
- package/android/build.gradle +7 -5
- package/dist/docs.json +1 -1
- package/dist/esm/definitions.d.ts +1 -1
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +1 -0
- package/dist/esm/web.js +34 -12
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +34 -12
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +34 -12
- package/dist/plugin.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,6 +51,8 @@ If you get the error `[GSI_LOGGER]: The given origin is not allowed for the give
|
|
|
51
51
|
|
|
52
52
|
- For the ios platform, you need to create a client ID of type iOS in the [Google Cloud Console](https://console.cloud.google.com/apis/dashboard). Add the client ID to the `{your-app}/ios/App/App/Info.plist` file with the key `GIDClientID` (see the demo app for reference). When creating the client ID, you will see the "iOS URL scheme" value in the Google Cloud Console. Add this also to the `Info.plist` file.
|
|
53
53
|
|
|
54
|
+
After some testing the Chrome browser may decide to block third-party sign-in promts on localhost. In the browser console you will see the message *Third-party sign in was disabled in browser Site Settings*. Re-enable it under `chrome://settings/content/federatedIdentityApi`
|
|
55
|
+
|
|
54
56
|
# Usage
|
|
55
57
|
|
|
56
58
|
### Example 1: Showing the button only if auto-sign-in or one-tap sign in fail.
|
|
@@ -88,6 +90,8 @@ const successResult = await GoogleOneTapAuth.addSignInActionToExistingButton(
|
|
|
88
90
|
'google-signin-existing-btn-parent', 'google-signin-existing-btn');
|
|
89
91
|
|
|
90
92
|
const signInResultSuccess = await Promise.race([autoOrOneTapSuccessPromise, renderButtonPromise]);
|
|
93
|
+
// If the user signed-in with the button, the UI may still be shown. So close it.
|
|
94
|
+
await GoogleOneTapAuth.cancelOneTapDialog();
|
|
91
95
|
console.log(signInResultSuccess);
|
|
92
96
|
```
|
|
93
97
|
|
package/android/build.gradle
CHANGED
|
@@ -4,20 +4,22 @@ buildscript {
|
|
|
4
4
|
google()
|
|
5
5
|
}
|
|
6
6
|
dependencies {
|
|
7
|
-
classpath 'com.android.tools.build:gradle:8.
|
|
8
|
-
classpath 'com.google.gms:google-services:4.
|
|
7
|
+
classpath 'com.android.tools.build:gradle:8.4.1'
|
|
8
|
+
classpath 'com.google.gms:google-services:4.4.2'
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
plugins {
|
|
13
|
+
id "com.android.library"
|
|
14
|
+
id "org.jetbrains.kotlin.android" version "2.0.0"
|
|
15
|
+
}
|
|
14
16
|
|
|
15
17
|
android {
|
|
16
18
|
namespace "com.proventask.capacitor.googleOneTapAuth.capacitorgoogleauth"
|
|
17
19
|
compileSdk 34
|
|
18
20
|
defaultConfig {
|
|
19
21
|
minSdkVersion 24
|
|
20
|
-
targetSdkVersion
|
|
22
|
+
targetSdkVersion 33
|
|
21
23
|
versionCode 1
|
|
22
24
|
versionName "1.0"
|
|
23
25
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
package/dist/docs.json
CHANGED
|
@@ -326,7 +326,7 @@
|
|
|
326
326
|
{
|
|
327
327
|
"name": "noSuccessReasonCode",
|
|
328
328
|
"tags": [],
|
|
329
|
-
"docs": "A reason code as 'tap_outside'.\nFor the js library see google.PromptMomentNotification for possible values.\nFor android and
|
|
329
|
+
"docs": "A reason code as 'tap_outside'.\nFor the js library see google.PromptMomentNotification for possible values.\nFor android, iOS and web 'SIGN_IN_CANCELLED' is currently set.",
|
|
330
330
|
"complexTypes": [],
|
|
331
331
|
"type": "string | undefined"
|
|
332
332
|
},
|
|
@@ -67,7 +67,7 @@ export interface NoSuccessSignInResult {
|
|
|
67
67
|
/**
|
|
68
68
|
* A reason code as 'tap_outside'.
|
|
69
69
|
* For the js library see google.PromptMomentNotification for possible values.
|
|
70
|
-
* For android and
|
|
70
|
+
* For android, iOS and web 'SIGN_IN_CANCELLED' is currently set.
|
|
71
71
|
*/
|
|
72
72
|
noSuccessReasonCode?: string;
|
|
73
73
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,wCAAwC","sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n\nexport interface InitializeOptions {\n /**\n * Your client ID of type Web application.\n */\n clientId: string;\n /**\n * A string that is included in the ID token if supported. It is auto-generated if not provided.\n * The com.google.android.gms.auth.api.identity api supports nonce, however the \n * com.google.android.gms.auth.api.signin does currently not, and for ios there is an open issue.\n * See https://github.com/google/GoogleSignIn-iOS/issues/135\n */\n nonce?: string;\n /**\n * \tWeb platform specific options..\n */\n webOptions?: InitializeWebOptions;\n}\n\nexport interface InitializeWebOptions {\n /**\n * This field sets whether or not to cancel the One Tap request if a user clicks outside the prompt. The default value is true.\n */\n cancelOnTapOutside?: boolean;\n}\n\nexport interface SignInResultPromises {\n successPromise: Promise<SuccessSignInResult>;\n noSuccess: Promise<NoSuccessSignInResult>;\n signInResultOptionPromise: Promise<SignInResultOption>;\n}\n\nexport interface SignInResultOption {\n /**\n * Indicates if the success or noSuccess property is set.\n */\n isSuccess: boolean;\n /**\n * Success result.\n */\n success?: SuccessSignInResult;\n /**\n * NoSuccess result.\n */\n noSuccess?: NoSuccessSignInResult;\n}\n\nexport interface SuccessSignInResult {\n /**\n * How the credential was retrieved.\n */\n isAutoSelect?: boolean;\n /**\n * The JWT token base64 encoded.\n */\n idToken: string;\n /**\n * A permanent id for the user.\n */\n userId: string;\n /**\n * The email address.\n */\n email: string;\n /**\n * The decoded JWT token.\n * The signature is not verified when decoding the token.\n */\n decodedIdToken: any;\n}\n\nexport interface NoSuccessSignInResult {\n /**\n * A reason code as 'tap_outside'.\n * For the js library see google.PromptMomentNotification for possible values.\n * For android and
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,wCAAwC","sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n\nexport interface InitializeOptions {\n /**\n * Your client ID of type Web application.\n */\n clientId: string;\n /**\n * A string that is included in the ID token if supported. It is auto-generated if not provided.\n * The com.google.android.gms.auth.api.identity api supports nonce, however the \n * com.google.android.gms.auth.api.signin does currently not, and for ios there is an open issue.\n * See https://github.com/google/GoogleSignIn-iOS/issues/135\n */\n nonce?: string;\n /**\n * \tWeb platform specific options..\n */\n webOptions?: InitializeWebOptions;\n}\n\nexport interface InitializeWebOptions {\n /**\n * This field sets whether or not to cancel the One Tap request if a user clicks outside the prompt. The default value is true.\n */\n cancelOnTapOutside?: boolean;\n}\n\nexport interface SignInResultPromises {\n successPromise: Promise<SuccessSignInResult>;\n noSuccess: Promise<NoSuccessSignInResult>;\n signInResultOptionPromise: Promise<SignInResultOption>;\n}\n\nexport interface SignInResultOption {\n /**\n * Indicates if the success or noSuccess property is set.\n */\n isSuccess: boolean;\n /**\n * Success result.\n */\n success?: SuccessSignInResult;\n /**\n * NoSuccess result.\n */\n noSuccess?: NoSuccessSignInResult;\n}\n\nexport interface SuccessSignInResult {\n /**\n * How the credential was retrieved.\n */\n isAutoSelect?: boolean;\n /**\n * The JWT token base64 encoded.\n */\n idToken: string;\n /**\n * A permanent id for the user.\n */\n userId: string;\n /**\n * The email address.\n */\n email: string;\n /**\n * The decoded JWT token.\n * The signature is not verified when decoding the token.\n */\n decodedIdToken: any;\n}\n\nexport interface NoSuccessSignInResult {\n /**\n * A reason code as 'tap_outside'.\n * For the js library see google.PromptMomentNotification for possible values.\n * For android, iOS and web 'SIGN_IN_CANCELLED' is currently set.\n */\n noSuccessReasonCode?: string;\n /**\n * A error message.\n * Set in case of error if the native android code is used.\n */\n noSuccessAdditionalInfo?: string;\n}\n\nexport interface RenderSignInButtonOptions {\n /**\n * \tWeb platform specific options..\n */\n webOptions?: RenderSignInButtonWebOptions;\n}\n\nexport interface RenderSignInButtonWebOptions {\n /**\n * \tEnables upgraded One Tap UX on ITP browsers. The default value is false.\n */\n itpSupport?: boolean;\n /**\n * \tThe Sign In With Google button UX flow. The default value is 'popup'.\n */\n uxMode?: 'popup' | 'redirect';\n}\n\nexport interface SignOutResult {\n isSuccess: boolean;\n error?: string;\n}\n\nexport interface GoogleOneTapAuthPlugin {\n /**\n * Performs common or one-time initializations.\n * For the web platform, starts pre-loading the google one tap JavaScript library.\n * initialize must be called before any other method.\n * initialize remembers if it was called so it is safe to be called multiple times.\n * Other methods wait till initialize is finished so you must not await initialize.\n * @param options \n */\n initialize(options: InitializeOptions): Promise<void>;\n\n /**\n * Tries to first auto-sign-in the user and if not successful sign-in the user with just one tap/click.\n * If there is a single google account and that account has previously signed into the app, \n * then that user is auto signed in. A short popover is displayed during sign-in.\n * If there are multiple google accounts and more than one have previously signed into the \n * app then a user selection screen is shown.\n * If there is no active google session or if no user session has logged in previously in \n * the app or if the user has opt out of One Tap, then the response will indicate that \n * the auto sign-in did not succeed.\n * See https://developers.google.com/identity/gsi/web/guides/features\n * @returns A Promise object that resolves to an object with isSuccess, success and noSuccess properties.\n */\n tryAutoOrOneTapSignIn()\n : Promise<SignInResultOption>;\n\n /**\n * Tries to show the sign-in UI without trying to auto sign-in the user.\n * @returns A Promise object that resolves to an object with isSuccess, success and noSuccess properties.\n */\n tryOneTapSignIn()\n : Promise<SignInResultOption>;\n\n /**\n * Tries to auto-sign-in the user without any user interaction needed.\n * If there is a single google account and that account has previously signed into the app, \n * then that user is auto signed in. A short popover is displayed during sign-in.\n * @returns A Promise object that resolves to an object with isSuccess, success and noSuccess properties.\n */\n tryAutoSignIn()\n : Promise<SignInResultOption>;\n\n /**\n * Allows using a custom sign-in button.\n * The element to which buttonParentId refers must have the style position: 'relative'.\n * For the web platform, the implementation renders the google button invisible in front of the passed button.\n * The returned promise will only resolve if successful.\n * The returned promise is rejected for unrecoverable errors as 'unregistered_origin' \n * for the web platform.\n * @param buttonParentId \n * @param buttonId\n */\n addSignInActionToExistingButton(\n buttonParentId: string,\n buttonId: string)\n : Promise<SuccessSignInResult>;\n\n /**\n * Renders the sign-in button.\n * The returned promise will only resolve if successful.\n * The returned promise is rejected for unrecoverable errors as 'unregistered_origin' \n * for the web platform.\n * @param parentElementId \n * @param options \n * @param gsiButtonConfiguration Not all button configuration options are supported on android.\n */\n renderSignInButton(\n parentElementId: string,\n options: RenderSignInButtonOptions,\n gsiButtonConfiguration?: google.GsiButtonConfiguration)\n : Promise<SuccessSignInResult>;\n\n /**\n * Closes the One Tap prompt.\n */\n cancelOneTapDialog(): void;\n\n /**\n * Ends the session.\n */\n signOut(): Promise<SignOutResult>;\n\n /**\n * Gets the last user defined or auto-created nonce.\n * Unfortunately not all google libraries support setting a nonce, so this is currently \n * not universally useful.\n */\n getNonce(): string;\n}\n"]}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare class GoogleOneTapAuthWeb extends WebPlugin {
|
|
|
7
7
|
initializeOptions?: InitializeOptions;
|
|
8
8
|
isGapiLoadRequested: boolean;
|
|
9
9
|
fedCMAbortController?: AbortController;
|
|
10
|
+
cancelCalledAbortReason: string;
|
|
10
11
|
initialize(options: InitializeOptions): Promise<void>;
|
|
11
12
|
tryAutoOrOneTapSignIn(): Promise<SignInResultOption>;
|
|
12
13
|
tryOneTapSignIn(): Promise<SignInResultOption>;
|
package/dist/esm/web.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { WebPlugin } from '@capacitor/core';
|
|
2
2
|
import { assert, loadScript } from './helpers';
|
|
3
|
+
var FedCMSignInResult;
|
|
4
|
+
(function (FedCMSignInResult) {
|
|
5
|
+
FedCMSignInResult[FedCMSignInResult["SUCCESS"] = 0] = "SUCCESS";
|
|
6
|
+
FedCMSignInResult[FedCMSignInResult["CANCELLED"] = 1] = "CANCELLED";
|
|
7
|
+
FedCMSignInResult[FedCMSignInResult["OTHER_ERROR"] = 2] = "OTHER_ERROR";
|
|
8
|
+
})(FedCMSignInResult || (FedCMSignInResult = {}));
|
|
3
9
|
// See https://developers.google.com/identity/gsi/web/guides/use-one-tap-js-api
|
|
4
10
|
export class GoogleOneTapAuthWeb extends WebPlugin {
|
|
5
11
|
constructor() {
|
|
@@ -9,6 +15,7 @@ export class GoogleOneTapAuthWeb extends WebPlugin {
|
|
|
9
15
|
this.initializeOptions = undefined;
|
|
10
16
|
this.isGapiLoadRequested = false;
|
|
11
17
|
this.fedCMAbortController = undefined;
|
|
18
|
+
this.cancelCalledAbortReason = 'CANCEL_CALLED';
|
|
12
19
|
}
|
|
13
20
|
async initialize(options) {
|
|
14
21
|
this.initializeOptions = options;
|
|
@@ -20,7 +27,9 @@ export class GoogleOneTapAuthWeb extends WebPlugin {
|
|
|
20
27
|
}
|
|
21
28
|
async tryAutoOrOneTapSignIn() {
|
|
22
29
|
let signInResult = await this.doSignIn(true);
|
|
23
|
-
if (!signInResult.idToken
|
|
30
|
+
if (!signInResult.idToken
|
|
31
|
+
// If the popup was cancelled, do not show it again.
|
|
32
|
+
&& signInResult.noSuccessReasonCode !== 'SIGN_IN_CANCELLED') {
|
|
24
33
|
signInResult = await this.doSignIn(false);
|
|
25
34
|
}
|
|
26
35
|
if (signInResult.idToken) {
|
|
@@ -80,9 +89,11 @@ export class GoogleOneTapAuthWeb extends WebPlugin {
|
|
|
80
89
|
return signInPromise;
|
|
81
90
|
}
|
|
82
91
|
async fedCMSignIn(autoSelect, resolveSignInFunc) {
|
|
92
|
+
var _a, _b;
|
|
83
93
|
try {
|
|
94
|
+
// console.log(`IdentityCredential supported: ${'IdentityCredential' in window}`);
|
|
84
95
|
if ('IdentityCredential' in window === false) {
|
|
85
|
-
return
|
|
96
|
+
return FedCMSignInResult.OTHER_ERROR;
|
|
86
97
|
}
|
|
87
98
|
this.fedCMAbortController = new AbortController();
|
|
88
99
|
// see https://developers.google.com/privacy-sandbox/3pcd/fedcm
|
|
@@ -104,21 +115,30 @@ export class GoogleOneTapAuthWeb extends WebPlugin {
|
|
|
104
115
|
});
|
|
105
116
|
// console.log('fedCMSignIn result: ', identityCredential);
|
|
106
117
|
if (!(identityCredential === null || identityCredential === void 0 ? void 0 : identityCredential.token)) {
|
|
107
|
-
return
|
|
118
|
+
return FedCMSignInResult.OTHER_ERROR;
|
|
108
119
|
}
|
|
109
120
|
resolveSignInFunc({
|
|
110
121
|
idToken: identityCredential.token,
|
|
111
122
|
isAutoSelect: identityCredential.isAutoSelect
|
|
112
123
|
});
|
|
113
|
-
return
|
|
124
|
+
return FedCMSignInResult.SUCCESS;
|
|
114
125
|
}
|
|
115
126
|
catch (e) {
|
|
116
127
|
// NotSupportedError DOMException
|
|
117
128
|
// IdentityCredentialError DOMException
|
|
118
|
-
// NetworkError DOMException
|
|
129
|
+
// NetworkError DOMException --> name: 'NetworkError'
|
|
119
130
|
// NotAllowedError DOMException
|
|
120
|
-
|
|
121
|
-
|
|
131
|
+
const name = (_a = e.name) !== null && _a !== void 0 ? _a : '';
|
|
132
|
+
const message = (_b = e.message) !== null && _b !== void 0 ? _b : '';
|
|
133
|
+
// console.log('fedCMSignIn error: ', e, name);
|
|
134
|
+
if (message.includes(this.cancelCalledAbortReason)
|
|
135
|
+
|| (name === 'NetworkError' && message.includes('Error retrieving a token.'))) {
|
|
136
|
+
return FedCMSignInResult.CANCELLED;
|
|
137
|
+
}
|
|
138
|
+
return FedCMSignInResult.OTHER_ERROR;
|
|
139
|
+
}
|
|
140
|
+
finally {
|
|
141
|
+
this.fedCMAbortController = undefined;
|
|
122
142
|
}
|
|
123
143
|
}
|
|
124
144
|
fedCMSignOut() {
|
|
@@ -126,11 +146,15 @@ export class GoogleOneTapAuthWeb extends WebPlugin {
|
|
|
126
146
|
}
|
|
127
147
|
fedCMAbort() {
|
|
128
148
|
var _a;
|
|
129
|
-
(_a = this.fedCMAbortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
149
|
+
(_a = this.fedCMAbortController) === null || _a === void 0 ? void 0 : _a.abort({ message: this.cancelCalledAbortReason });
|
|
130
150
|
}
|
|
131
151
|
async doSignIn(autoSelect) {
|
|
132
152
|
var signInPromise = new Promise(async (resolve, _reject) => {
|
|
133
|
-
|
|
153
|
+
let fedCMResult = await this.fedCMSignIn(autoSelect, resolve);
|
|
154
|
+
if (fedCMResult === FedCMSignInResult.CANCELLED) {
|
|
155
|
+
resolve({ noSuccessReasonCode: 'SIGN_IN_CANCELLED' });
|
|
156
|
+
}
|
|
157
|
+
else if (fedCMResult === FedCMSignInResult.OTHER_ERROR) {
|
|
134
158
|
this.oneTapInitialize(autoSelect, resolve); // The resolve function is passed, so it can be called in handleCredentialResponse.
|
|
135
159
|
google.accounts.id.prompt();
|
|
136
160
|
}
|
|
@@ -160,10 +184,8 @@ export class GoogleOneTapAuthWeb extends WebPlugin {
|
|
|
160
184
|
resolveSignInFunc(signInResult);
|
|
161
185
|
}
|
|
162
186
|
cancelOneTapDialog() {
|
|
163
|
-
if (this.isGapiLoadRequested === false) {
|
|
164
|
-
this.fedCMAbort();
|
|
165
|
-
}
|
|
166
187
|
google.accounts.id.cancel();
|
|
188
|
+
this.fedCMAbort();
|
|
167
189
|
}
|
|
168
190
|
signOut(authenticatedUserId) {
|
|
169
191
|
if (this.isGapiLoadRequested === false) {
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAa/C,+EAA+E;AAC/E,MAAM,OAAO,mBAAoB,SAAQ,SAAS;IAAlD;;QACE,iBAAY,GAAG,wCAAwC,CAAC;QACxD,sBAAiB,GAAmB,SAAS,CAAC;QAC9C,sBAAiB,GAAuB,SAAS,CAAC;QAClD,wBAAmB,GAAG,KAAK,CAAC;QAC5B,yBAAoB,GAAqB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,OAAO,IAAI,OAAO,CAAgB,CAAC,OAAO,EAAE,EAAE;YAC5C,IAAI,mBAAmB,EAAE;gBACvB,gHAAgH;gBAChH,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,mBAAmB,EAAE,QAAQ,CAAC,EAAE;oBACxD,IAAI,QAAQ,CAAC,UAAU,EAAE;wBACvB,OAAO,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;qBAC9B;yBACI;wBACH,OAAO,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;qBACtD;gBACH,CAAC,CAAC,CAAC;aACJ;iBAAM;gBACL,OAAO,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;aAC9B;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport { InitializeOptions, SignInResultOption, SuccessSignInResult, NoSuccessSignInResult, SignOutResult, RenderSignInButtonOptions, RenderSignInButtonWebOptions } from './definitions';\nimport { assert, loadScript } from './helpers';\nimport type { NotEnrichedSuccessSignInResult } from './definitionsInternal';\nimport { type IdConfiguration } from 'google-one-tap';\n\n// Workaround for 'error TS2686: 'google' refers to a UMD global, but the current file is a module. Consider adding an import instead.'\ndeclare var google: {\n accounts: google.accounts\n};\n\ntype ResolveSignInFunc = (result: NotEnrichedSuccessSignInResult) => void;\n\ntype IdentityCredential = Credential & { isAutoSelect: boolean, token: string }\n\n// See https://developers.google.com/identity/gsi/web/guides/use-one-tap-js-api\nexport class GoogleOneTapAuthWeb extends WebPlugin {\n gsiScriptUrl = 'https://accounts.google.com/gsi/client';\n gapiLoadedPromise?: Promise<void> = undefined;\n initializeOptions?: InitializeOptions = undefined;\n isGapiLoadRequested = false;\n fedCMAbortController?: AbortController = undefined;\n\n async initialize(options: InitializeOptions): Promise<void> {\n this.initializeOptions = options;\n if (!this.gapiLoadedPromise) {\n this.gapiLoadedPromise = loadScript(this.gsiScriptUrl);\n this.isGapiLoadRequested = true;\n }\n return this.gapiLoadedPromise;\n }\n\n async tryAutoOrOneTapSignIn(): Promise<SignInResultOption> {\n let signInResult = await this.doSignIn(true);\n\n if (!(signInResult as SuccessSignInResult).idToken) {\n signInResult = await this.doSignIn(false);\n }\n\n if ((signInResult as SuccessSignInResult).idToken) {\n return {\n isSuccess: true,\n success: signInResult as SuccessSignInResult\n }\n } else {\n return {\n isSuccess: false,\n noSuccess: signInResult as NoSuccessSignInResult\n }\n }\n }\n\n async tryOneTapSignIn(): Promise<SignInResultOption> {\n let signInResult = await this.doSignIn(false);\n\n if ((signInResult as SuccessSignInResult).idToken) {\n return {\n isSuccess: true,\n success: signInResult as SuccessSignInResult\n }\n } else {\n return {\n isSuccess: false,\n noSuccess: signInResult as NoSuccessSignInResult\n }\n }\n }\n\n async tryAutoSignIn(): Promise<SignInResultOption> {\n let signInResult = await this.doSignIn(true);\n\n if ((signInResult as SuccessSignInResult).idToken) {\n return {\n isSuccess: true,\n success: signInResult as SuccessSignInResult\n }\n } else {\n return {\n isSuccess: false,\n noSuccess: signInResult as NoSuccessSignInResult\n }\n }\n }\n\n async renderSignInButton(parentElementId: string, options: RenderSignInButtonOptions, gsiButtonConfiguration?: google.GsiButtonConfiguration): Promise<NotEnrichedSuccessSignInResult> {\n const parentElem = document.getElementById(parentElementId);\n assert(() => !!parentElem)\n var signInPromise = new Promise<NotEnrichedSuccessSignInResult>((resolve) => {\n this.oneTapInitialize(false, resolve, options.webOptions);\n\n // // Adding a click_listener allows to detect when the popup is opened.\n // (gsiButtonConfiguration as any).click_listener = () => {\n // console.log('click_listener');\n // };\n google.accounts.id.renderButton(\n parentElem!,\n gsiButtonConfiguration!\n );\n });\n return signInPromise;\n }\n\n private async fedCMSignIn(autoSelect: boolean, resolveSignInFunc: ResolveSignInFunc) {\n try {\n if ('IdentityCredential' in window === false) {\n return false;\n }\n this.fedCMAbortController = new AbortController();\n // see https://developers.google.com/privacy-sandbox/3pcd/fedcm\n // see https://developers.google.com/privacy-sandbox/blog/fedcm-auto-reauthn\n const identityCredential = await navigator.credentials.get({\n identity: {\n context: 'signin',\n providers: [\n {\n configURL: 'https://accounts.google.com/gsi/fedcm.json',\n clientId: this.initializeOptions!.clientId!,\n // loginHint: ''\n nonce: this.initializeOptions!.nonce\n }\n ]\n },\n mediation: autoSelect ? 'optional' : 'required' as 'optional' | 'required' | 'silent',\n signal: this.fedCMAbortController.signal\n } as any) as IdentityCredential;\n\n // console.log('fedCMSignIn result: ', identityCredential);\n\n if (!identityCredential?.token) {\n return false;\n }\n\n resolveSignInFunc({\n idToken: identityCredential.token,\n isAutoSelect: identityCredential.isAutoSelect\n });\n\n return true;\n } catch (e) {\n // NotSupportedError DOMException\n // IdentityCredentialError DOMException\n // NetworkError DOMException\n // NotAllowedError DOMException\n // console.error('fedCMSignIn Error: ', e);\n return false;\n }\n }\n\n private fedCMSignOut() {\n navigator.credentials.preventSilentAccess();\n }\n\n private fedCMAbort() {\n this.fedCMAbortController?.abort()\n }\n\n private async doSignIn(autoSelect: boolean) {\n var signInPromise = new Promise<NotEnrichedSuccessSignInResult | NoSuccessSignInResult>(async (resolve, _reject) => {\n if (await this.fedCMSignIn(autoSelect, resolve) === false) {\n this.oneTapInitialize(autoSelect, resolve); // The resolve function is passed, so it can be called in handleCredentialResponse.\n google.accounts.id.prompt();\n }\n });\n return signInPromise;\n }\n\n private oneTapInitialize(autoSelect: boolean, resolveSignInFunc: ResolveSignInFunc, buttonWebOptions?: RenderSignInButtonWebOptions) {\n google.accounts.id.initialize({\n client_id: this.initializeOptions!.clientId!,\n callback: (credentialResponse) => this.handleCredentialResponse(credentialResponse, resolveSignInFunc),\n auto_select: autoSelect,\n itp_support: buttonWebOptions?.itpSupport || false,\n cancel_on_tap_outside: this.initializeOptions!.webOptions?.cancelOnTapOutside || true,\n ux_mode: buttonWebOptions?.uxMode || 'popup',\n nonce: this.initializeOptions!.nonce,\n use_fedcm_for_prompt: true,\n use_fedcm_for_button: true\n // log_level: 'debug'\n } as IdConfiguration & { use_fedcm_for_prompt: boolean });\n }\n\n private handleCredentialResponse(credentialResponse: google.CredentialResponse, resolveSignInFunc: ResolveSignInFunc) {\n let signInResult: NotEnrichedSuccessSignInResult = {\n idToken: credentialResponse.credential,\n isAutoSelect: credentialResponse.isAutoSelect,\n };\n resolveSignInFunc(signInResult);\n }\n\n cancelOneTapDialog(): void {\n if (this.isGapiLoadRequested === false) {\n this.fedCMAbort();\n }\n google.accounts.id.cancel();\n }\n\n signOut(authenticatedUserId: string | undefined): Promise<SignOutResult> {\n if (this.isGapiLoadRequested === false) {\n this.fedCMSignOut();\n return Promise.resolve({ isSuccess: true });\n }\n return new Promise<SignOutResult>((resolve) => {\n if (authenticatedUserId) {\n // Calling revoke method revokes all OAuth2 scopes previously granted by the Sign In With Google client library.\n google.accounts.id.revoke(authenticatedUserId, response => {\n if (response.successful) {\n resolve({ isSuccess: true });\n }\n else {\n resolve({ isSuccess: false, error: response.error });\n }\n });\n } else {\n resolve({ isSuccess: true });\n }\n });\n }\n}"]}
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAa/C,IAAK,iBAAqD;AAA1D,WAAK,iBAAiB;IAAG,+DAAO,CAAA;IAAE,mEAAS,CAAA;IAAE,uEAAW,CAAA;AAAC,CAAC,EAArD,iBAAiB,KAAjB,iBAAiB,QAAoC;AAE1D,+EAA+E;AAC/E,MAAM,OAAO,mBAAoB,SAAQ,SAAS;IAAlD;;QACE,iBAAY,GAAG,wCAAwC,CAAC;QACxD,sBAAiB,GAAmB,SAAS,CAAC;QAC9C,sBAAiB,GAAuB,SAAS,CAAC;QAClD,wBAAmB,GAAG,KAAK,CAAC;QAC5B,yBAA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C,CAAC;aAC9B;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport { InitializeOptions, SignInResultOption, SuccessSignInResult, NoSuccessSignInResult, SignOutResult, RenderSignInButtonOptions, RenderSignInButtonWebOptions } from './definitions';\nimport { assert, loadScript } from './helpers';\nimport type { NotEnrichedSuccessSignInResult } from './definitionsInternal';\nimport { type IdConfiguration } from 'google-one-tap';\n\n// Workaround for 'error TS2686: 'google' refers to a UMD global, but the current file is a module. Consider adding an import instead.'\ndeclare var google: {\n accounts: google.accounts\n};\n\ntype ResolveSignInFunc = (result: NotEnrichedSuccessSignInResult) => void;\n\ntype IdentityCredential = Credential & { isAutoSelect: boolean, token: string }\n\nenum FedCMSignInResult { SUCCESS, CANCELLED, OTHER_ERROR }\n\n// See https://developers.google.com/identity/gsi/web/guides/use-one-tap-js-api\nexport class GoogleOneTapAuthWeb extends WebPlugin {\n gsiScriptUrl = 'https://accounts.google.com/gsi/client';\n gapiLoadedPromise?: Promise<void> = undefined;\n initializeOptions?: InitializeOptions = undefined;\n isGapiLoadRequested = false;\n fedCMAbortController?: AbortController = undefined;\n cancelCalledAbortReason = 'CANCEL_CALLED';\n\n async initialize(options: InitializeOptions): Promise<void> {\n this.initializeOptions = options;\n if (!this.gapiLoadedPromise) {\n this.gapiLoadedPromise = loadScript(this.gsiScriptUrl);\n this.isGapiLoadRequested = true;\n }\n return this.gapiLoadedPromise;\n }\n\n async tryAutoOrOneTapSignIn(): Promise<SignInResultOption> {\n let signInResult = await this.doSignIn(true);\n\n if (!(signInResult as SuccessSignInResult).idToken\n // If the popup was cancelled, do not show it again.\n && (signInResult as NoSuccessSignInResult).noSuccessReasonCode !== 'SIGN_IN_CANCELLED') {\n signInResult = await this.doSignIn(false);\n }\n\n if ((signInResult as SuccessSignInResult).idToken) {\n return {\n isSuccess: true,\n success: signInResult as SuccessSignInResult\n }\n } else {\n return {\n isSuccess: false,\n noSuccess: signInResult as NoSuccessSignInResult\n }\n }\n }\n\n async tryOneTapSignIn(): Promise<SignInResultOption> {\n let signInResult = await this.doSignIn(false);\n\n if ((signInResult as SuccessSignInResult).idToken) {\n return {\n isSuccess: true,\n success: signInResult as SuccessSignInResult\n }\n } else {\n return {\n isSuccess: false,\n noSuccess: signInResult as NoSuccessSignInResult\n }\n }\n }\n\n async tryAutoSignIn(): Promise<SignInResultOption> {\n let signInResult = await this.doSignIn(true);\n\n if ((signInResult as SuccessSignInResult).idToken) {\n return {\n isSuccess: true,\n success: signInResult as SuccessSignInResult\n }\n } else {\n return {\n isSuccess: false,\n noSuccess: signInResult as NoSuccessSignInResult\n }\n }\n }\n\n async renderSignInButton(parentElementId: string, options: RenderSignInButtonOptions, gsiButtonConfiguration?: google.GsiButtonConfiguration): Promise<NotEnrichedSuccessSignInResult> {\n const parentElem = document.getElementById(parentElementId);\n assert(() => !!parentElem)\n var signInPromise = new Promise<NotEnrichedSuccessSignInResult>((resolve) => {\n this.oneTapInitialize(false, resolve, options.webOptions);\n\n // // Adding a click_listener allows to detect when the popup is opened.\n // (gsiButtonConfiguration as any).click_listener = () => {\n // console.log('click_listener');\n // };\n google.accounts.id.renderButton(\n parentElem!,\n gsiButtonConfiguration!\n );\n });\n return signInPromise;\n }\n\n private async fedCMSignIn(autoSelect: boolean, resolveSignInFunc: ResolveSignInFunc) : Promise<FedCMSignInResult> {\n try {\n // console.log(`IdentityCredential supported: ${'IdentityCredential' in window}`);\n if ('IdentityCredential' in window === false) {\n return FedCMSignInResult.OTHER_ERROR;\n }\n this.fedCMAbortController = new AbortController();\n // see https://developers.google.com/privacy-sandbox/3pcd/fedcm\n // see https://developers.google.com/privacy-sandbox/blog/fedcm-auto-reauthn\n const identityCredential = await navigator.credentials.get({\n identity: {\n context: 'signin',\n providers: [\n {\n configURL: 'https://accounts.google.com/gsi/fedcm.json',\n clientId: this.initializeOptions!.clientId!,\n // loginHint: ''\n nonce: this.initializeOptions!.nonce\n }\n ]\n },\n mediation: autoSelect ? 'optional' : 'required' as 'optional' | 'required' | 'silent',\n signal: this.fedCMAbortController.signal\n } as any) as IdentityCredential;\n\n // console.log('fedCMSignIn result: ', identityCredential);\n\n if (!identityCredential?.token) {\n return FedCMSignInResult.OTHER_ERROR;\n }\n\n resolveSignInFunc({\n idToken: identityCredential.token,\n isAutoSelect: identityCredential.isAutoSelect\n });\n\n return FedCMSignInResult.SUCCESS;\n } catch (e) {\n // NotSupportedError DOMException\n // IdentityCredentialError DOMException\n // NetworkError DOMException --> name: 'NetworkError'\n // NotAllowedError DOMException\n const name = (e as Error).name ?? '';\n const message = (e as Error).message ?? '';\n // console.log('fedCMSignIn error: ', e, name);\n if (message.includes(this.cancelCalledAbortReason) \n || (name === 'NetworkError' && message.includes('Error retrieving a token.'))) {\n return FedCMSignInResult.CANCELLED;\n }\n return FedCMSignInResult.OTHER_ERROR;\n }\n finally {\n this.fedCMAbortController = undefined;\n }\n }\n\n private fedCMSignOut() {\n navigator.credentials.preventSilentAccess();\n }\n\n private fedCMAbort() {\n this.fedCMAbortController?.abort({ message: this.cancelCalledAbortReason });\n }\n\n private async doSignIn(autoSelect: boolean) {\n var signInPromise = new Promise<NotEnrichedSuccessSignInResult | NoSuccessSignInResult>(async (resolve, _reject) => {\n let fedCMResult = await this.fedCMSignIn(autoSelect, resolve);\n\n if (fedCMResult === FedCMSignInResult.CANCELLED) {\n resolve({noSuccessReasonCode: 'SIGN_IN_CANCELLED' });\n } else if (fedCMResult === FedCMSignInResult.OTHER_ERROR) {\n this.oneTapInitialize(autoSelect, resolve); // The resolve function is passed, so it can be called in handleCredentialResponse.\n google.accounts.id.prompt();\n }\n });\n return signInPromise;\n }\n\n private oneTapInitialize(autoSelect: boolean, resolveSignInFunc: ResolveSignInFunc, buttonWebOptions?: RenderSignInButtonWebOptions) {\n google.accounts.id.initialize({\n client_id: this.initializeOptions!.clientId!,\n callback: (credentialResponse) => this.handleCredentialResponse(credentialResponse, resolveSignInFunc),\n auto_select: autoSelect,\n itp_support: buttonWebOptions?.itpSupport || false,\n cancel_on_tap_outside: this.initializeOptions!.webOptions?.cancelOnTapOutside || true,\n ux_mode: buttonWebOptions?.uxMode || 'popup',\n nonce: this.initializeOptions!.nonce,\n use_fedcm_for_prompt: true,\n use_fedcm_for_button: true\n // log_level: 'debug'\n } as IdConfiguration & { use_fedcm_for_prompt: boolean });\n }\n\n private handleCredentialResponse(credentialResponse: google.CredentialResponse, resolveSignInFunc: ResolveSignInFunc) {\n let signInResult: NotEnrichedSuccessSignInResult = {\n idToken: credentialResponse.credential,\n isAutoSelect: credentialResponse.isAutoSelect,\n };\n resolveSignInFunc(signInResult);\n }\n\n cancelOneTapDialog(): void {\n google.accounts.id.cancel();\n this.fedCMAbort();\n }\n\n signOut(authenticatedUserId: string | undefined): Promise<SignOutResult> {\n if (this.isGapiLoadRequested === false) {\n this.fedCMSignOut();\n return Promise.resolve({ isSuccess: true });\n }\n return new Promise<SignOutResult>((resolve) => {\n if (authenticatedUserId) {\n // Calling revoke method revokes all OAuth2 scopes previously granted by the Sign In With Google client library.\n google.accounts.id.revoke(authenticatedUserId, response => {\n if (response.successful) {\n resolve({ isSuccess: true });\n }\n else {\n resolve({ isSuccess: false, error: response.error });\n }\n });\n } else {\n resolve({ isSuccess: true });\n }\n });\n }\n}"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -38,6 +38,12 @@ function loadScript(url) {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
var FedCMSignInResult;
|
|
42
|
+
(function (FedCMSignInResult) {
|
|
43
|
+
FedCMSignInResult[FedCMSignInResult["SUCCESS"] = 0] = "SUCCESS";
|
|
44
|
+
FedCMSignInResult[FedCMSignInResult["CANCELLED"] = 1] = "CANCELLED";
|
|
45
|
+
FedCMSignInResult[FedCMSignInResult["OTHER_ERROR"] = 2] = "OTHER_ERROR";
|
|
46
|
+
})(FedCMSignInResult || (FedCMSignInResult = {}));
|
|
41
47
|
// See https://developers.google.com/identity/gsi/web/guides/use-one-tap-js-api
|
|
42
48
|
class GoogleOneTapAuthWeb extends core.WebPlugin {
|
|
43
49
|
constructor() {
|
|
@@ -47,6 +53,7 @@ class GoogleOneTapAuthWeb extends core.WebPlugin {
|
|
|
47
53
|
this.initializeOptions = undefined;
|
|
48
54
|
this.isGapiLoadRequested = false;
|
|
49
55
|
this.fedCMAbortController = undefined;
|
|
56
|
+
this.cancelCalledAbortReason = 'CANCEL_CALLED';
|
|
50
57
|
}
|
|
51
58
|
async initialize(options) {
|
|
52
59
|
this.initializeOptions = options;
|
|
@@ -58,7 +65,9 @@ class GoogleOneTapAuthWeb extends core.WebPlugin {
|
|
|
58
65
|
}
|
|
59
66
|
async tryAutoOrOneTapSignIn() {
|
|
60
67
|
let signInResult = await this.doSignIn(true);
|
|
61
|
-
if (!signInResult.idToken
|
|
68
|
+
if (!signInResult.idToken
|
|
69
|
+
// If the popup was cancelled, do not show it again.
|
|
70
|
+
&& signInResult.noSuccessReasonCode !== 'SIGN_IN_CANCELLED') {
|
|
62
71
|
signInResult = await this.doSignIn(false);
|
|
63
72
|
}
|
|
64
73
|
if (signInResult.idToken) {
|
|
@@ -118,9 +127,11 @@ class GoogleOneTapAuthWeb extends core.WebPlugin {
|
|
|
118
127
|
return signInPromise;
|
|
119
128
|
}
|
|
120
129
|
async fedCMSignIn(autoSelect, resolveSignInFunc) {
|
|
130
|
+
var _a, _b;
|
|
121
131
|
try {
|
|
132
|
+
// console.log(`IdentityCredential supported: ${'IdentityCredential' in window}`);
|
|
122
133
|
if ('IdentityCredential' in window === false) {
|
|
123
|
-
return
|
|
134
|
+
return FedCMSignInResult.OTHER_ERROR;
|
|
124
135
|
}
|
|
125
136
|
this.fedCMAbortController = new AbortController();
|
|
126
137
|
// see https://developers.google.com/privacy-sandbox/3pcd/fedcm
|
|
@@ -142,21 +153,30 @@ class GoogleOneTapAuthWeb extends core.WebPlugin {
|
|
|
142
153
|
});
|
|
143
154
|
// console.log('fedCMSignIn result: ', identityCredential);
|
|
144
155
|
if (!(identityCredential === null || identityCredential === void 0 ? void 0 : identityCredential.token)) {
|
|
145
|
-
return
|
|
156
|
+
return FedCMSignInResult.OTHER_ERROR;
|
|
146
157
|
}
|
|
147
158
|
resolveSignInFunc({
|
|
148
159
|
idToken: identityCredential.token,
|
|
149
160
|
isAutoSelect: identityCredential.isAutoSelect
|
|
150
161
|
});
|
|
151
|
-
return
|
|
162
|
+
return FedCMSignInResult.SUCCESS;
|
|
152
163
|
}
|
|
153
164
|
catch (e) {
|
|
154
165
|
// NotSupportedError DOMException
|
|
155
166
|
// IdentityCredentialError DOMException
|
|
156
|
-
// NetworkError DOMException
|
|
167
|
+
// NetworkError DOMException --> name: 'NetworkError'
|
|
157
168
|
// NotAllowedError DOMException
|
|
158
|
-
|
|
159
|
-
|
|
169
|
+
const name = (_a = e.name) !== null && _a !== void 0 ? _a : '';
|
|
170
|
+
const message = (_b = e.message) !== null && _b !== void 0 ? _b : '';
|
|
171
|
+
// console.log('fedCMSignIn error: ', e, name);
|
|
172
|
+
if (message.includes(this.cancelCalledAbortReason)
|
|
173
|
+
|| (name === 'NetworkError' && message.includes('Error retrieving a token.'))) {
|
|
174
|
+
return FedCMSignInResult.CANCELLED;
|
|
175
|
+
}
|
|
176
|
+
return FedCMSignInResult.OTHER_ERROR;
|
|
177
|
+
}
|
|
178
|
+
finally {
|
|
179
|
+
this.fedCMAbortController = undefined;
|
|
160
180
|
}
|
|
161
181
|
}
|
|
162
182
|
fedCMSignOut() {
|
|
@@ -164,11 +184,15 @@ class GoogleOneTapAuthWeb extends core.WebPlugin {
|
|
|
164
184
|
}
|
|
165
185
|
fedCMAbort() {
|
|
166
186
|
var _a;
|
|
167
|
-
(_a = this.fedCMAbortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
187
|
+
(_a = this.fedCMAbortController) === null || _a === void 0 ? void 0 : _a.abort({ message: this.cancelCalledAbortReason });
|
|
168
188
|
}
|
|
169
189
|
async doSignIn(autoSelect) {
|
|
170
190
|
var signInPromise = new Promise(async (resolve, _reject) => {
|
|
171
|
-
|
|
191
|
+
let fedCMResult = await this.fedCMSignIn(autoSelect, resolve);
|
|
192
|
+
if (fedCMResult === FedCMSignInResult.CANCELLED) {
|
|
193
|
+
resolve({ noSuccessReasonCode: 'SIGN_IN_CANCELLED' });
|
|
194
|
+
}
|
|
195
|
+
else if (fedCMResult === FedCMSignInResult.OTHER_ERROR) {
|
|
172
196
|
this.oneTapInitialize(autoSelect, resolve); // The resolve function is passed, so it can be called in handleCredentialResponse.
|
|
173
197
|
google.accounts.id.prompt();
|
|
174
198
|
}
|
|
@@ -198,10 +222,8 @@ class GoogleOneTapAuthWeb extends core.WebPlugin {
|
|
|
198
222
|
resolveSignInFunc(signInResult);
|
|
199
223
|
}
|
|
200
224
|
cancelOneTapDialog() {
|
|
201
|
-
if (this.isGapiLoadRequested === false) {
|
|
202
|
-
this.fedCMAbort();
|
|
203
|
-
}
|
|
204
225
|
google.accounts.id.cancel();
|
|
226
|
+
this.fedCMAbort();
|
|
205
227
|
}
|
|
206
228
|
signOut(authenticatedUserId) {
|
|
207
229
|
if (this.isGapiLoadRequested === false) {
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/helpers.js","esm/web.js","esm/GoogleOneTapAuth.js"],"sourcesContent":["export function assert(predicate, customMessage) {\n if (!predicate()) {\n const callerName = callingFunctionName();\n if (customMessage != undefined) {\n throw Error(customMessage + `. Error in ${callerName}.`);\n }\n throw Error(`Assert error, expected '${predicate}' to be true. Error in ${callerName}.`);\n }\n}\nexport function randomHexString(length) {\n let uint8RandomNumbers = new Uint8Array((length / 2) + 1);\n uint8RandomNumbers = crypto.getRandomValues(uint8RandomNumbers);\n const numbersAsHexString = Array.from(uint8RandomNumbers).map(x => x.toString(16)).join('');\n return numbersAsHexString.substring(0, length);\n}\nfunction callingFunctionName() {\n var _a;\n try {\n return (_a = (new Error()).stack) === null || _a === void 0 ? void 0 : _a.split(\"\\n\")[3].trim().split(\" \")[1];\n }\n catch (_b) {\n // ignore.\n }\n}\nexport function loadScript(url) {\n return new Promise((resolve, reject) => {\n var scriptEl = document.createElement('script');\n scriptEl.async = true;\n scriptEl.onerror = () => reject();\n scriptEl.onload = () => resolve();\n scriptEl.src = url;\n document.getElementsByTagName('head')[0].appendChild(scriptEl);\n });\n}\n//# sourceMappingURL=helpers.js.map","import { WebPlugin } from '@capacitor/core';\nimport { assert, loadScript } from './helpers';\n// See https://developers.google.com/identity/gsi/web/guides/use-one-tap-js-api\nexport class GoogleOneTapAuthWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.gsiScriptUrl = 'https://accounts.google.com/gsi/client';\n this.gapiLoadedPromise = undefined;\n this.initializeOptions = undefined;\n this.isGapiLoadRequested = false;\n this.fedCMAbortController = undefined;\n }\n async initialize(options) {\n this.initializeOptions = options;\n if (!this.gapiLoadedPromise) {\n this.gapiLoadedPromise = loadScript(this.gsiScriptUrl);\n this.isGapiLoadRequested = true;\n }\n return this.gapiLoadedPromise;\n }\n async tryAutoOrOneTapSignIn() {\n let signInResult = await this.doSignIn(true);\n if (!signInResult.idToken) {\n signInResult = await this.doSignIn(false);\n }\n if (signInResult.idToken) {\n return {\n isSuccess: true,\n success: signInResult\n };\n }\n else {\n return {\n isSuccess: false,\n noSuccess: signInResult\n };\n }\n }\n async tryOneTapSignIn() {\n let signInResult = await this.doSignIn(false);\n if (signInResult.idToken) {\n return {\n isSuccess: true,\n success: signInResult\n };\n }\n else {\n return {\n isSuccess: false,\n noSuccess: signInResult\n };\n }\n }\n async tryAutoSignIn() {\n let signInResult = await this.doSignIn(true);\n if (signInResult.idToken) {\n return {\n isSuccess: true,\n success: signInResult\n };\n }\n else {\n return {\n isSuccess: false,\n noSuccess: signInResult\n };\n }\n }\n async renderSignInButton(parentElementId, options, gsiButtonConfiguration) {\n const parentElem = document.getElementById(parentElementId);\n assert(() => !!parentElem);\n var signInPromise = new Promise((resolve) => {\n this.oneTapInitialize(false, resolve, options.webOptions);\n // // Adding a click_listener allows to detect when the popup is opened.\n // (gsiButtonConfiguration as any).click_listener = () => {\n // console.log('click_listener');\n // };\n google.accounts.id.renderButton(parentElem, gsiButtonConfiguration);\n });\n return signInPromise;\n }\n async fedCMSignIn(autoSelect, resolveSignInFunc) {\n try {\n if ('IdentityCredential' in window === false) {\n return false;\n }\n this.fedCMAbortController = new AbortController();\n // see https://developers.google.com/privacy-sandbox/3pcd/fedcm\n // see https://developers.google.com/privacy-sandbox/blog/fedcm-auto-reauthn\n const identityCredential = await navigator.credentials.get({\n identity: {\n context: 'signin',\n providers: [\n {\n configURL: 'https://accounts.google.com/gsi/fedcm.json',\n clientId: this.initializeOptions.clientId,\n // loginHint: ''\n nonce: this.initializeOptions.nonce\n }\n ]\n },\n mediation: autoSelect ? 'optional' : 'required',\n signal: this.fedCMAbortController.signal\n });\n // console.log('fedCMSignIn result: ', identityCredential);\n if (!(identityCredential === null || identityCredential === void 0 ? void 0 : identityCredential.token)) {\n return false;\n }\n resolveSignInFunc({\n idToken: identityCredential.token,\n isAutoSelect: identityCredential.isAutoSelect\n });\n return true;\n }\n catch (e) {\n // NotSupportedError DOMException\n // IdentityCredentialError DOMException\n // NetworkError DOMException\n // NotAllowedError DOMException\n // console.error('fedCMSignIn Error: ', e);\n return false;\n }\n }\n fedCMSignOut() {\n navigator.credentials.preventSilentAccess();\n }\n fedCMAbort() {\n var _a;\n (_a = this.fedCMAbortController) === null || _a === void 0 ? void 0 : _a.abort();\n }\n async doSignIn(autoSelect) {\n var signInPromise = new Promise(async (resolve, _reject) => {\n if (await this.fedCMSignIn(autoSelect, resolve) === false) {\n this.oneTapInitialize(autoSelect, resolve); // The resolve function is passed, so it can be called in handleCredentialResponse.\n google.accounts.id.prompt();\n }\n });\n return signInPromise;\n }\n oneTapInitialize(autoSelect, resolveSignInFunc, buttonWebOptions) {\n var _a;\n google.accounts.id.initialize({\n client_id: this.initializeOptions.clientId,\n callback: (credentialResponse) => this.handleCredentialResponse(credentialResponse, resolveSignInFunc),\n auto_select: autoSelect,\n itp_support: (buttonWebOptions === null || buttonWebOptions === void 0 ? void 0 : buttonWebOptions.itpSupport) || false,\n cancel_on_tap_outside: ((_a = this.initializeOptions.webOptions) === null || _a === void 0 ? void 0 : _a.cancelOnTapOutside) || true,\n ux_mode: (buttonWebOptions === null || buttonWebOptions === void 0 ? void 0 : buttonWebOptions.uxMode) || 'popup',\n nonce: this.initializeOptions.nonce,\n use_fedcm_for_prompt: true,\n use_fedcm_for_button: true\n // log_level: 'debug'\n });\n }\n handleCredentialResponse(credentialResponse, resolveSignInFunc) {\n let signInResult = {\n idToken: credentialResponse.credential,\n isAutoSelect: credentialResponse.isAutoSelect,\n };\n resolveSignInFunc(signInResult);\n }\n cancelOneTapDialog() {\n if (this.isGapiLoadRequested === false) {\n this.fedCMAbort();\n }\n google.accounts.id.cancel();\n }\n signOut(authenticatedUserId) {\n if (this.isGapiLoadRequested === false) {\n this.fedCMSignOut();\n return Promise.resolve({ isSuccess: true });\n }\n return new Promise((resolve) => {\n if (authenticatedUserId) {\n // Calling revoke method revokes all OAuth2 scopes previously granted by the Sign In With Google client library.\n google.accounts.id.revoke(authenticatedUserId, response => {\n if (response.successful) {\n resolve({ isSuccess: true });\n }\n else {\n resolve({ isSuccess: false, error: response.error });\n }\n });\n }\n else {\n resolve({ isSuccess: true });\n }\n });\n }\n}\n//# sourceMappingURL=web.js.map","import { Capacitor, registerPlugin } from '@capacitor/core';\nimport { assert, randomHexString } from './helpers';\nimport { GoogleOneTapAuthWeb } from './web';\nimport { jwtDecode } from \"jwt-decode\";\nconst GoogleOneTapAuthPlatform = registerPlugin('GoogleOneTapAuth', {\n web: () => new GoogleOneTapAuthWeb(),\n});\nvar InitializeStatus;\n(function (InitializeStatus) {\n InitializeStatus[InitializeStatus[\"NotInitialized\"] = 0] = \"NotInitialized\";\n InitializeStatus[InitializeStatus[\"Initializing\"] = 1] = \"Initializing\";\n InitializeStatus[InitializeStatus[\"Initialized\"] = 2] = \"Initialized\";\n})(InitializeStatus || (InitializeStatus = {}));\n// This file is the entry point for all plugin methods. It contains common logic to web, android, iOS or delegates to the specific implementation.\nclass GoogleOneTapAuth {\n constructor() {\n this.initializeStatus = InitializeStatus.NotInitialized;\n this.authenticatedUserId = undefined;\n this.isInitializedPromise = new Promise((resolve) => {\n this.resolveIsInitializedPromise = resolve;\n });\n }\n /// Performs common or one-time initialization. Can be called multiple times.\n initialize(options) {\n if (this.initializeStatus === InitializeStatus.NotInitialized) {\n this.initializeStatus = InitializeStatus.Initializing;\n if (!options.clientId || options.clientId.endsWith(\"apps.googleusercontent.com\") == false) {\n throw new Error(\"clientId must end with 'apps.googleusercontent.com' but is: \" + options.clientId);\n }\n this.nonce = options.nonce = options.nonce || randomHexString(10);\n GoogleOneTapAuthPlatform.initialize(options).then(() => {\n this.initializeStatus = InitializeStatus.Initialized;\n this.resolveIsInitializedPromise();\n });\n }\n return this.isInitializedPromise;\n }\n async ensureInitialized() {\n assert(() => this.initializeStatus !== InitializeStatus.NotInitialized, 'Must call initialize first.');\n if (this.initializeStatus === InitializeStatus.Initializing) {\n await this.isInitializedPromise;\n }\n }\n async tryAutoOrOneTapSignIn() {\n await this.ensureInitialized();\n const notEnrichtedSignInResultOption = await GoogleOneTapAuthPlatform.tryAutoOrOneTapSignIn();\n const enrichtedSignInResultOption = this.enrichOptionResultWithDecodedIdToken(notEnrichtedSignInResultOption);\n this.onResultReceived(enrichtedSignInResultOption);\n return enrichtedSignInResultOption;\n }\n async tryOneTapSignIn() {\n await this.ensureInitialized();\n const notEnrichtedSignInResultOption = await GoogleOneTapAuthPlatform.tryOneTapSignIn();\n const enrichtedSignInResultOption = this.enrichOptionResultWithDecodedIdToken(notEnrichtedSignInResultOption);\n this.onResultReceived(enrichtedSignInResultOption);\n return enrichtedSignInResultOption;\n }\n async tryAutoSignIn() {\n await this.ensureInitialized();\n const notEnrichtedSignInResultOption = await GoogleOneTapAuthPlatform.tryAutoSignIn();\n const enrichtedSignInResultOption = this.enrichOptionResultWithDecodedIdToken(notEnrichtedSignInResultOption);\n this.onResultReceived(enrichtedSignInResultOption);\n return enrichtedSignInResultOption;\n }\n onResultReceived(signInResultOption) {\n if (signInResultOption.isSuccess) {\n this.authenticatedUserId = signInResultOption.success.userId;\n }\n }\n cancelOneTapDialog() {\n GoogleOneTapAuthPlatform.cancelOneTapDialog();\n }\n async signOut() {\n const result = await GoogleOneTapAuthPlatform.signOut(this.authenticatedUserId);\n this.authenticatedUserId = undefined;\n return result;\n }\n async addSignInActionToExistingButton(buttonParentId, buttonId) {\n await this.ensureInitialized();\n const buttonParentElem = document.getElementById(buttonParentId);\n const buttonElem = document.getElementById(buttonId);\n assert(() => !!buttonParentElem);\n assert(() => !!buttonElem);\n if (Capacitor.getPlatform() === 'web') {\n buttonParentElem.style.position = 'relative';\n buttonParentElem.style.overflow = 'hidden';\n // buttonParentElem!.style.border = '2px solid red'; // uncomment for debugging\n // The visible button width should be the same as the google button width.\n const buttonElemWidth = await this.waitForElementOffsetWidthNotZero(buttonElem);\n assert(() => buttonElemWidth !== 0);\n const invisibleGoogleButtonDiv = document.createElement('div');\n const invisibleGoogleButtonDivId = 'invisibleGoogleButtonDiv';\n invisibleGoogleButtonDiv.setAttribute('id', invisibleGoogleButtonDivId);\n invisibleGoogleButtonDiv.style.position = 'absolute';\n invisibleGoogleButtonDiv.style.top = '0px';\n invisibleGoogleButtonDiv.style.left = '0px';\n invisibleGoogleButtonDiv.style.width = `${buttonElemWidth}px`;\n invisibleGoogleButtonDiv.style.boxSizing = 'border-box';\n invisibleGoogleButtonDiv.style.opacity = '0.0001'; // change it for debugging\n buttonElem.appendChild(invisibleGoogleButtonDiv);\n return await this._doRenderSignInButton(invisibleGoogleButtonDivId, {}, { width: buttonElemWidth }, buttonElem);\n }\n else {\n return await this._doRenderSignInButton(buttonParentId, {}, {}, buttonElem);\n }\n }\n waitForElementOffsetWidthNotZero(element) {\n if (element.offsetWidth !== 0) {\n return Promise.resolve(element.offsetWidth);\n }\n return new Promise((resolve) => {\n const resizeObserver = new ResizeObserver(() => {\n if (element.offsetWidth !== 0) {\n resolve(element.offsetWidth);\n }\n });\n resizeObserver.observe(element);\n });\n }\n async renderSignInButton(parentElementId, options, gsiButtonConfiguration) {\n const androidAndIosButtonElem = this.getSignInButtonHtml(gsiButtonConfiguration);\n return this._doRenderSignInButton(parentElementId, options, gsiButtonConfiguration, androidAndIosButtonElem);\n }\n async _doRenderSignInButton(parentElementId, options, gsiButtonConfiguration, androidAndIosButtonElem) {\n await this.ensureInitialized();\n const parentElem = document.getElementById(parentElementId);\n assert(() => !!parentElem);\n options.webOptions = options.webOptions || {};\n return new Promise(async (resolve, reject) => {\n try {\n if (Capacitor.getPlatform() === 'web') {\n const notEnrichedSuccessSignInResult = await GoogleOneTapAuthPlatform.renderSignInButton(parentElementId, options, gsiButtonConfiguration);\n const enrichtedSuccessSignInResult = this.enrichSuccessResultWithDecodedIdToken(notEnrichedSuccessSignInResult);\n this.authenticatedUserId = enrichtedSuccessSignInResult.userId;\n resolve(enrichtedSuccessSignInResult);\n return;\n }\n const onClickAction = async () => {\n var _a;\n try {\n const notEnrichedSuccessSignInResult = await GoogleOneTapAuthPlatform.triggerGoogleSignIn(options);\n if (notEnrichedSuccessSignInResult.isSuccess) {\n const enrichtedSuccessSignInResult = this.enrichSuccessResultWithDecodedIdToken(notEnrichedSuccessSignInResult.success);\n this.authenticatedUserId = enrichtedSuccessSignInResult.userId;\n resolve(enrichtedSuccessSignInResult);\n }\n else {\n if (((_a = notEnrichedSuccessSignInResult.noSuccess) === null || _a === void 0 ? void 0 : _a.noSuccessReasonCode) === 'SIGN_IN_CANCELLED') {\n // console.log('User cancelled sign in. Waiting for next sign in attempt.');\n }\n }\n }\n catch (e) {\n reject(e);\n }\n };\n androidAndIosButtonElem.onclick = onClickAction;\n parentElem.appendChild(androidAndIosButtonElem);\n }\n catch (e) {\n reject(e);\n }\n });\n }\n getNonce() {\n assert(() => !!this.nonce, `The nonce is only set after ${() => this.initialize} was called.`);\n return this.nonce;\n }\n enrichOptionResultWithDecodedIdToken(signInResultOption) {\n if (signInResultOption.isSuccess === false) {\n return signInResultOption;\n }\n return Object.assign(Object.assign({}, signInResultOption), { success: this.enrichSuccessResultWithDecodedIdToken(signInResultOption.success) });\n }\n enrichSuccessResultWithDecodedIdToken(successSignInResult) {\n const decodedJwt = jwtDecode(successSignInResult.idToken);\n return Object.assign(Object.assign({}, successSignInResult), { decodedIdToken: decodedJwt, userId: decodedJwt.sub, email: decodedJwt.email });\n }\n getSignInButtonHtml(gsiButtonConfiguration) {\n var _a;\n // Note: Replacing double quotes with single quotes will break some strings.\n const localizedStrings = {\n en: { signin: 'Sign in', continue_with: 'Continue with Google', signin_with: 'Sign in with Google', signup_with: 'Sign up with Google' },\n ar: { signin: '\\u062a\\u0633\\u062c\\u064a\\u0644 \\u0627\\u0644\\u062f\\u062e\\u0648\\u0644', continue_with: '\\u0627\\u0644\\u0645\\u0648\\u0627\\u0635\\u0644\\u0629 \\u0628\\u0627\\u0633\\u062a\\u062e\\u062f\\u0627\\u0645 Google', signin_with: '\\u062a\\u0633\\u062c\\u064a\\u0644 \\u0627\\u0644\\u062f\\u062e\\u0648\\u0644 \\u0628\\u0627\\u0633\\u062a\\u062e\\u062f\\u0627\\u0645 Google', signup_with: '\\u0627\\u0644\\u0627\\u0634\\u062a\\u0631\\u0627\\u0643 \\u0645\\u0646 \\u062e\\u0644\\u0627\\u0644 Google' },\n sr: { signin: '\\u041f\\u0440\\u0438\\u0458\\u0430\\u0432\\u0438 \\u043c\\u0435', continue_with: '\\u041d\\u0430\\u0441\\u0442\\u0430\\u0432\\u0438\\u0442\\u0435 \\u0441\\u0430 Google-\\u043e\\u043c', signin_with: '\\u041f\\u0440\\u0438\\u0458\\u0430\\u0432\\u0438\\u0442\\u0435 \\u0441\\u0435 \\u043f\\u043e\\u043c\\u043e\\u045b\\u0443 Google-\\u0430', signup_with: '\\u0420\\u0435\\u0433\\u0438\\u0441\\u0442\\u0440\\u0443\\u0458\\u0442\\u0435 \\u0441\\u0435 \\u043f\\u043e\\u043c\\u043e\\u045b\\u0443 Google-\\u0430' },\n nb: { signin: 'Logg p\\u00e5', continue_with: 'Fortsett med Google', signin_with: 'Logg p\\u00e5 med Google', signup_with: 'Registrer deg med Google' },\n pl: { signin: 'Zaloguj si\\u0119', continue_with: 'Kontynuuj przy u\\u017cyciu konta Google', signin_with: 'Zaloguj si\\u0119 przez Google', signup_with: 'Zarejestruj si\\u0119 przez Google' },\n vi: { signin: '\\u0110\\u0103ng nh\\u1eadp', continue_with: 'Ti\\u1ebfp t\\u1ee5c truy c\\u1eadp Google', signin_with: '\\u0110\\u0103ng nh\\u00e2\\u0323p b\\u0103\\u0300ng Google', signup_with: '\\u0110\\u0103ng k\\u00fd b\\u1eb1ng Google' },\n cs: { signin: 'P\\u0159ihl\\u00e1sit se', continue_with: 'Pokra\\u010dovat pomoc\\u00ed Googlu', signin_with: \"P\\u0159ihl\\u00e1sit se p\\u0159es Google\", signup_with: 'Registrace pomoc\\u00ed Googlu' },\n id: { signin: 'Login', continue_with: 'Lanjutkan dengan Google', signin_with: 'Login dengan Google', signup_with: 'Daftar dengan Google' },\n nl: { signin: 'Inloggen', continue_with: 'Doorgaan met Google', signin_with: 'Inloggen met Google', signup_with: 'Aanmelden bij Google' },\n gl: { signin: 'Iniciar sesi\\u00f3n', continue_with: 'Continuar con Google', signin_with: 'Iniciar sesi\\u00f3n con Google', signup_with: 'Iniciar sesi\\u00f3n con Google' },\n sv: { signin: 'Logga in', continue_with: 'Forts\\u00e4tt med Google', signin_with: 'Logga in med Google', signup_with: 'Registrera dig med Google' },\n lv: { signin: 'Pierakst\\u012b\\u0161an\\u0101s', continue_with: 'Turpin\\u0101t darbu ar Google', signin_with: 'Pierakstieties ar Google', signup_with: 'Re\\u0123istr\\u0113\\u0161an\\u0101s, izmantojot Google' },\n tr: { signin: 'Oturum a\\u00e7\\u0131n', continue_with: 'Google ile devam edin', signin_with: 'Google ile oturum a\\u00e7\\u0131n', signup_with: 'Google ile kaydolun' },\n it: { signin: 'Accedi', continue_with: 'Continua con Google', signin_with: 'Accedi con Google', signup_with: 'Registrati con Google' },\n sq: { signin: 'Identifikohu', continue_with: 'Vazhdo me Google', signin_with: 'Identifikohu me Google', signup_with: 'Regjistrohu me Google' },\n ro: { signin: 'Conecteaz\\u0103-te', continue_with: 'Continu\\u0103 cu Google', signin_with: 'Conecteaz\\u0103-te cu Google', signup_with: '\\u00censcrie-te cu Google' },\n de: { signin: 'Anmelden', continue_with: 'Weiter mit Google', signin_with: '\\u00dcber Google anmelden', signup_with: 'Mit Google anmelden' },\n ko: { signin: '\\ub85c\\uadf8\\uc778', continue_with: 'Google \\uacc4\\uc815\\uc73c\\ub85c \\uacc4\\uc18d\\ud558\\uae30', signin_with: 'Google \\uacc4\\uc815\\uc73c\\ub85c \\ub85c\\uadf8\\uc778', signup_with: 'Google \\uacc4\\uc815\\uc73c\\ub85c \\uac00\\uc785\\ud558\\uae30' },\n fr: { signin: 'Se connecter', continue_with: 'Continuer avec Google', signin_with: 'Se connecter avec Google', signup_with: \"S'inscrire avec Google\" },\n kmr: { signin: 'Oturum a\\u00e7\\u0131n', continue_with: 'Google ile devam edin', signin_with: 'Google ile oturum a\\u00e7\\u0131n', signup_with: 'Google ile kaydolun' },\n zh: { signin: '\\u767b\\u5f55', continue_with: '\\u901a\\u8fc7 Google \\u7ee7\\u7eed\\u64cd\\u4f5c', signin_with: \"\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u767b\\u5f55\", signup_with: '\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u6ce8\\u518c' },\n 'zh-CN': { signin: '\\u767b\\u5f55', continue_with: '\\u901a\\u8fc7 Google \\u7ee7\\u7eed\\u64cd\\u4f5c', signin_with: \"\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u767b\\u5f55\", signup_with: '\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u6ce8\\u518c' },\n 'zh-HK': { signin: '\\u767b\\u5165', continue_with: '\\u7e7c\\u7e8c\\u900f\\u904e Google \\u5e33\\u6236\\u64cd\\u4f5c', signin_with: '\\u4f7f\\u7528 Google \\u5e33\\u6236\\u767b\\u5165', signup_with: '\\u4f7f\\u7528 Google \\u5e33\\u6236\\u8a3b\\u518a' },\n pt: { signin: 'Fazer login', continue_with: 'Continuar com o Google', signin_with: 'Fazer login com o Google', signup_with: 'Inscrever-se no Google' },\n es: { signin: 'Iniciar sesi\\u00f3n', continue_with: 'Continuar con Google', signin_with: 'Iniciar sesi\\u00f3n con Google', signup_with: 'Registrarse con Google' },\n };\n const locale = gsiButtonConfiguration === null || gsiButtonConfiguration === void 0 ? void 0 : gsiButtonConfiguration.locale;\n let localeTexts = locale !== undefined && locale in localizedStrings ? (localizedStrings[locale]) : undefined;\n if (localeTexts === undefined) {\n const countryCode = (locale === null || locale === void 0 ? void 0 : locale.includes('-')) === true ? locale.split('-')[1] : (locale !== null && locale !== void 0 ? locale : '');\n localeTexts = countryCode in localizedStrings ? localizedStrings[countryCode] : localizedStrings['en'];\n }\n const text = (_a = gsiButtonConfiguration === null || gsiButtonConfiguration === void 0 ? void 0 : gsiButtonConfiguration.text) !== null && _a !== void 0 ? _a : 'signin_with';\n const buttonText = localeTexts[text];\n // HTML from https://github.com/inouiw/ReactSignInWithGoogleButton\n const button = document.createElement('button');\n button.setAttribute(\"style\", \"border-radius: 4px; background-color: rgb(255, 255, 255); border: 1px solid rgb(218, 220, 224); color: rgb(60, 64, 67); cursor: pointer; font-family: Roboto, Verdana; font-weight: 500; font-size: 14px; height: 40px; letter-spacing: 0.25px; padding: 0px 12px; position: relative; text-align: center; vertical-align: middle; width: auto;\");\n button.innerHTML = `\n <div style=\"display: flex; align-items: center; flex-flow: row nowrap; justify-content: space-between; height: 100%; position: relative; width: 100%;\">\n <div style=\"height: 18px; margin-right: 8px; min-width: 18px; width: 18px;\">\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"18px\" height=\"18px\" viewBox=\"0 0 48 48\">\n <g>\n <path fill=\"#EA4335\" d=\"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z\"></path>\n <path fill=\"#4285F4\" d=\"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z\"></path>\n <path fill=\"#FBBC05\" d=\"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z\"></path>\n <path fill=\"#34A853\" d=\"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z\"></path>\n <path fill=\"none\" d=\"M0 0h48v48H0z\"></path>\n </g>\n </svg>\n </div>\n <p>${buttonText}</p>\n </div>`;\n return button;\n }\n}\nconst googleOneTapAuth = new GoogleOneTapAuth();\nexport { googleOneTapAuth as GoogleOneTapAuth };\n//# sourceMappingURL=GoogleOneTapAuth.js.map"],"names":["WebPlugin","registerPlugin","Capacitor","jwtDecode"],"mappings":";;;;;AAAO,SAAS,MAAM,CAAC,SAAS,EAAE,aAAa,EAAE;AACjD,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE;AACtB,QAAQ,MAAM,UAAU,GAAG,mBAAmB,EAAE,CAAC;AACjD,QAAQ,IAAI,aAAa,IAAI,SAAS,EAAE;AACxC,YAAY,MAAM,KAAK,CAAC,aAAa,GAAG,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,SAAS;AACT,QAAQ,MAA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":["esm/helpers.js","esm/web.js","esm/GoogleOneTapAuth.js"],"sourcesContent":["export function assert(predicate, customMessage) {\n if (!predicate()) {\n const callerName = callingFunctionName();\n if (customMessage != undefined) {\n throw Error(customMessage + `. Error in ${callerName}.`);\n }\n throw Error(`Assert error, expected '${predicate}' to be true. Error in ${callerName}.`);\n }\n}\nexport function randomHexString(length) {\n let uint8RandomNumbers = new Uint8Array((length / 2) + 1);\n uint8RandomNumbers = crypto.getRandomValues(uint8RandomNumbers);\n const numbersAsHexString = Array.from(uint8RandomNumbers).map(x => x.toString(16)).join('');\n return numbersAsHexString.substring(0, length);\n}\nfunction callingFunctionName() {\n var _a;\n try {\n return (_a = (new Error()).stack) === null || _a === void 0 ? void 0 : _a.split(\"\\n\")[3].trim().split(\" \")[1];\n }\n catch (_b) {\n // ignore.\n }\n}\nexport function loadScript(url) {\n return new Promise((resolve, reject) => {\n var scriptEl = document.createElement('script');\n scriptEl.async = true;\n scriptEl.onerror = () => reject();\n scriptEl.onload = () => resolve();\n scriptEl.src = url;\n document.getElementsByTagName('head')[0].appendChild(scriptEl);\n });\n}\n//# sourceMappingURL=helpers.js.map","import { WebPlugin } from '@capacitor/core';\nimport { assert, loadScript } from './helpers';\nvar FedCMSignInResult;\n(function (FedCMSignInResult) {\n FedCMSignInResult[FedCMSignInResult[\"SUCCESS\"] = 0] = \"SUCCESS\";\n FedCMSignInResult[FedCMSignInResult[\"CANCELLED\"] = 1] = \"CANCELLED\";\n FedCMSignInResult[FedCMSignInResult[\"OTHER_ERROR\"] = 2] = \"OTHER_ERROR\";\n})(FedCMSignInResult || (FedCMSignInResult = {}));\n// See https://developers.google.com/identity/gsi/web/guides/use-one-tap-js-api\nexport class GoogleOneTapAuthWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.gsiScriptUrl = 'https://accounts.google.com/gsi/client';\n this.gapiLoadedPromise = undefined;\n this.initializeOptions = undefined;\n this.isGapiLoadRequested = false;\n this.fedCMAbortController = undefined;\n this.cancelCalledAbortReason = 'CANCEL_CALLED';\n }\n async initialize(options) {\n this.initializeOptions = options;\n if (!this.gapiLoadedPromise) {\n this.gapiLoadedPromise = loadScript(this.gsiScriptUrl);\n this.isGapiLoadRequested = true;\n }\n return this.gapiLoadedPromise;\n }\n async tryAutoOrOneTapSignIn() {\n let signInResult = await this.doSignIn(true);\n if (!signInResult.idToken\n // If the popup was cancelled, do not show it again.\n && signInResult.noSuccessReasonCode !== 'SIGN_IN_CANCELLED') {\n signInResult = await this.doSignIn(false);\n }\n if (signInResult.idToken) {\n return {\n isSuccess: true,\n success: signInResult\n };\n }\n else {\n return {\n isSuccess: false,\n noSuccess: signInResult\n };\n }\n }\n async tryOneTapSignIn() {\n let signInResult = await this.doSignIn(false);\n if (signInResult.idToken) {\n return {\n isSuccess: true,\n success: signInResult\n };\n }\n else {\n return {\n isSuccess: false,\n noSuccess: signInResult\n };\n }\n }\n async tryAutoSignIn() {\n let signInResult = await this.doSignIn(true);\n if (signInResult.idToken) {\n return {\n isSuccess: true,\n success: signInResult\n };\n }\n else {\n return {\n isSuccess: false,\n noSuccess: signInResult\n };\n }\n }\n async renderSignInButton(parentElementId, options, gsiButtonConfiguration) {\n const parentElem = document.getElementById(parentElementId);\n assert(() => !!parentElem);\n var signInPromise = new Promise((resolve) => {\n this.oneTapInitialize(false, resolve, options.webOptions);\n // // Adding a click_listener allows to detect when the popup is opened.\n // (gsiButtonConfiguration as any).click_listener = () => {\n // console.log('click_listener');\n // };\n google.accounts.id.renderButton(parentElem, gsiButtonConfiguration);\n });\n return signInPromise;\n }\n async fedCMSignIn(autoSelect, resolveSignInFunc) {\n var _a, _b;\n try {\n // console.log(`IdentityCredential supported: ${'IdentityCredential' in window}`);\n if ('IdentityCredential' in window === false) {\n return FedCMSignInResult.OTHER_ERROR;\n }\n this.fedCMAbortController = new AbortController();\n // see https://developers.google.com/privacy-sandbox/3pcd/fedcm\n // see https://developers.google.com/privacy-sandbox/blog/fedcm-auto-reauthn\n const identityCredential = await navigator.credentials.get({\n identity: {\n context: 'signin',\n providers: [\n {\n configURL: 'https://accounts.google.com/gsi/fedcm.json',\n clientId: this.initializeOptions.clientId,\n // loginHint: ''\n nonce: this.initializeOptions.nonce\n }\n ]\n },\n mediation: autoSelect ? 'optional' : 'required',\n signal: this.fedCMAbortController.signal\n });\n // console.log('fedCMSignIn result: ', identityCredential);\n if (!(identityCredential === null || identityCredential === void 0 ? void 0 : identityCredential.token)) {\n return FedCMSignInResult.OTHER_ERROR;\n }\n resolveSignInFunc({\n idToken: identityCredential.token,\n isAutoSelect: identityCredential.isAutoSelect\n });\n return FedCMSignInResult.SUCCESS;\n }\n catch (e) {\n // NotSupportedError DOMException\n // IdentityCredentialError DOMException\n // NetworkError DOMException --> name: 'NetworkError'\n // NotAllowedError DOMException\n const name = (_a = e.name) !== null && _a !== void 0 ? _a : '';\n const message = (_b = e.message) !== null && _b !== void 0 ? _b : '';\n // console.log('fedCMSignIn error: ', e, name);\n if (message.includes(this.cancelCalledAbortReason)\n || (name === 'NetworkError' && message.includes('Error retrieving a token.'))) {\n return FedCMSignInResult.CANCELLED;\n }\n return FedCMSignInResult.OTHER_ERROR;\n }\n finally {\n this.fedCMAbortController = undefined;\n }\n }\n fedCMSignOut() {\n navigator.credentials.preventSilentAccess();\n }\n fedCMAbort() {\n var _a;\n (_a = this.fedCMAbortController) === null || _a === void 0 ? void 0 : _a.abort({ message: this.cancelCalledAbortReason });\n }\n async doSignIn(autoSelect) {\n var signInPromise = new Promise(async (resolve, _reject) => {\n let fedCMResult = await this.fedCMSignIn(autoSelect, resolve);\n if (fedCMResult === FedCMSignInResult.CANCELLED) {\n resolve({ noSuccessReasonCode: 'SIGN_IN_CANCELLED' });\n }\n else if (fedCMResult === FedCMSignInResult.OTHER_ERROR) {\n this.oneTapInitialize(autoSelect, resolve); // The resolve function is passed, so it can be called in handleCredentialResponse.\n google.accounts.id.prompt();\n }\n });\n return signInPromise;\n }\n oneTapInitialize(autoSelect, resolveSignInFunc, buttonWebOptions) {\n var _a;\n google.accounts.id.initialize({\n client_id: this.initializeOptions.clientId,\n callback: (credentialResponse) => this.handleCredentialResponse(credentialResponse, resolveSignInFunc),\n auto_select: autoSelect,\n itp_support: (buttonWebOptions === null || buttonWebOptions === void 0 ? void 0 : buttonWebOptions.itpSupport) || false,\n cancel_on_tap_outside: ((_a = this.initializeOptions.webOptions) === null || _a === void 0 ? void 0 : _a.cancelOnTapOutside) || true,\n ux_mode: (buttonWebOptions === null || buttonWebOptions === void 0 ? void 0 : buttonWebOptions.uxMode) || 'popup',\n nonce: this.initializeOptions.nonce,\n use_fedcm_for_prompt: true,\n use_fedcm_for_button: true\n // log_level: 'debug'\n });\n }\n handleCredentialResponse(credentialResponse, resolveSignInFunc) {\n let signInResult = {\n idToken: credentialResponse.credential,\n isAutoSelect: credentialResponse.isAutoSelect,\n };\n resolveSignInFunc(signInResult);\n }\n cancelOneTapDialog() {\n google.accounts.id.cancel();\n this.fedCMAbort();\n }\n signOut(authenticatedUserId) {\n if (this.isGapiLoadRequested === false) {\n this.fedCMSignOut();\n return Promise.resolve({ isSuccess: true });\n }\n return new Promise((resolve) => {\n if (authenticatedUserId) {\n // Calling revoke method revokes all OAuth2 scopes previously granted by the Sign In With Google client library.\n google.accounts.id.revoke(authenticatedUserId, response => {\n if (response.successful) {\n resolve({ isSuccess: true });\n }\n else {\n resolve({ isSuccess: false, error: response.error });\n }\n });\n }\n else {\n resolve({ isSuccess: true });\n }\n });\n }\n}\n//# sourceMappingURL=web.js.map","import { Capacitor, registerPlugin } from '@capacitor/core';\nimport { assert, randomHexString } from './helpers';\nimport { GoogleOneTapAuthWeb } from './web';\nimport { jwtDecode } from \"jwt-decode\";\nconst GoogleOneTapAuthPlatform = registerPlugin('GoogleOneTapAuth', {\n web: () => new GoogleOneTapAuthWeb(),\n});\nvar InitializeStatus;\n(function (InitializeStatus) {\n InitializeStatus[InitializeStatus[\"NotInitialized\"] = 0] = \"NotInitialized\";\n InitializeStatus[InitializeStatus[\"Initializing\"] = 1] = \"Initializing\";\n InitializeStatus[InitializeStatus[\"Initialized\"] = 2] = \"Initialized\";\n})(InitializeStatus || (InitializeStatus = {}));\n// This file is the entry point for all plugin methods. It contains common logic to web, android, iOS or delegates to the specific implementation.\nclass GoogleOneTapAuth {\n constructor() {\n this.initializeStatus = InitializeStatus.NotInitialized;\n this.authenticatedUserId = undefined;\n this.isInitializedPromise = new Promise((resolve) => {\n this.resolveIsInitializedPromise = resolve;\n });\n }\n /// Performs common or one-time initialization. Can be called multiple times.\n initialize(options) {\n if (this.initializeStatus === InitializeStatus.NotInitialized) {\n this.initializeStatus = InitializeStatus.Initializing;\n if (!options.clientId || options.clientId.endsWith(\"apps.googleusercontent.com\") == false) {\n throw new Error(\"clientId must end with 'apps.googleusercontent.com' but is: \" + options.clientId);\n }\n this.nonce = options.nonce = options.nonce || randomHexString(10);\n GoogleOneTapAuthPlatform.initialize(options).then(() => {\n this.initializeStatus = InitializeStatus.Initialized;\n this.resolveIsInitializedPromise();\n });\n }\n return this.isInitializedPromise;\n }\n async ensureInitialized() {\n assert(() => this.initializeStatus !== InitializeStatus.NotInitialized, 'Must call initialize first.');\n if (this.initializeStatus === InitializeStatus.Initializing) {\n await this.isInitializedPromise;\n }\n }\n async tryAutoOrOneTapSignIn() {\n await this.ensureInitialized();\n const notEnrichtedSignInResultOption = await GoogleOneTapAuthPlatform.tryAutoOrOneTapSignIn();\n const enrichtedSignInResultOption = this.enrichOptionResultWithDecodedIdToken(notEnrichtedSignInResultOption);\n this.onResultReceived(enrichtedSignInResultOption);\n return enrichtedSignInResultOption;\n }\n async tryOneTapSignIn() {\n await this.ensureInitialized();\n const notEnrichtedSignInResultOption = await GoogleOneTapAuthPlatform.tryOneTapSignIn();\n const enrichtedSignInResultOption = this.enrichOptionResultWithDecodedIdToken(notEnrichtedSignInResultOption);\n this.onResultReceived(enrichtedSignInResultOption);\n return enrichtedSignInResultOption;\n }\n async tryAutoSignIn() {\n await this.ensureInitialized();\n const notEnrichtedSignInResultOption = await GoogleOneTapAuthPlatform.tryAutoSignIn();\n const enrichtedSignInResultOption = this.enrichOptionResultWithDecodedIdToken(notEnrichtedSignInResultOption);\n this.onResultReceived(enrichtedSignInResultOption);\n return enrichtedSignInResultOption;\n }\n onResultReceived(signInResultOption) {\n if (signInResultOption.isSuccess) {\n this.authenticatedUserId = signInResultOption.success.userId;\n }\n }\n cancelOneTapDialog() {\n GoogleOneTapAuthPlatform.cancelOneTapDialog();\n }\n async signOut() {\n const result = await GoogleOneTapAuthPlatform.signOut(this.authenticatedUserId);\n this.authenticatedUserId = undefined;\n return result;\n }\n async addSignInActionToExistingButton(buttonParentId, buttonId) {\n await this.ensureInitialized();\n const buttonParentElem = document.getElementById(buttonParentId);\n const buttonElem = document.getElementById(buttonId);\n assert(() => !!buttonParentElem);\n assert(() => !!buttonElem);\n if (Capacitor.getPlatform() === 'web') {\n buttonParentElem.style.position = 'relative';\n buttonParentElem.style.overflow = 'hidden';\n // buttonParentElem!.style.border = '2px solid red'; // uncomment for debugging\n // The visible button width should be the same as the google button width.\n const buttonElemWidth = await this.waitForElementOffsetWidthNotZero(buttonElem);\n assert(() => buttonElemWidth !== 0);\n const invisibleGoogleButtonDiv = document.createElement('div');\n const invisibleGoogleButtonDivId = 'invisibleGoogleButtonDiv';\n invisibleGoogleButtonDiv.setAttribute('id', invisibleGoogleButtonDivId);\n invisibleGoogleButtonDiv.style.position = 'absolute';\n invisibleGoogleButtonDiv.style.top = '0px';\n invisibleGoogleButtonDiv.style.left = '0px';\n invisibleGoogleButtonDiv.style.width = `${buttonElemWidth}px`;\n invisibleGoogleButtonDiv.style.boxSizing = 'border-box';\n invisibleGoogleButtonDiv.style.opacity = '0.0001'; // change it for debugging\n buttonElem.appendChild(invisibleGoogleButtonDiv);\n return await this._doRenderSignInButton(invisibleGoogleButtonDivId, {}, { width: buttonElemWidth }, buttonElem);\n }\n else {\n return await this._doRenderSignInButton(buttonParentId, {}, {}, buttonElem);\n }\n }\n waitForElementOffsetWidthNotZero(element) {\n if (element.offsetWidth !== 0) {\n return Promise.resolve(element.offsetWidth);\n }\n return new Promise((resolve) => {\n const resizeObserver = new ResizeObserver(() => {\n if (element.offsetWidth !== 0) {\n resolve(element.offsetWidth);\n }\n });\n resizeObserver.observe(element);\n });\n }\n async renderSignInButton(parentElementId, options, gsiButtonConfiguration) {\n const androidAndIosButtonElem = this.getSignInButtonHtml(gsiButtonConfiguration);\n return this._doRenderSignInButton(parentElementId, options, gsiButtonConfiguration, androidAndIosButtonElem);\n }\n async _doRenderSignInButton(parentElementId, options, gsiButtonConfiguration, androidAndIosButtonElem) {\n await this.ensureInitialized();\n const parentElem = document.getElementById(parentElementId);\n assert(() => !!parentElem);\n options.webOptions = options.webOptions || {};\n return new Promise(async (resolve, reject) => {\n try {\n if (Capacitor.getPlatform() === 'web') {\n const notEnrichedSuccessSignInResult = await GoogleOneTapAuthPlatform.renderSignInButton(parentElementId, options, gsiButtonConfiguration);\n const enrichtedSuccessSignInResult = this.enrichSuccessResultWithDecodedIdToken(notEnrichedSuccessSignInResult);\n this.authenticatedUserId = enrichtedSuccessSignInResult.userId;\n resolve(enrichtedSuccessSignInResult);\n return;\n }\n const onClickAction = async () => {\n var _a;\n try {\n const notEnrichedSuccessSignInResult = await GoogleOneTapAuthPlatform.triggerGoogleSignIn(options);\n if (notEnrichedSuccessSignInResult.isSuccess) {\n const enrichtedSuccessSignInResult = this.enrichSuccessResultWithDecodedIdToken(notEnrichedSuccessSignInResult.success);\n this.authenticatedUserId = enrichtedSuccessSignInResult.userId;\n resolve(enrichtedSuccessSignInResult);\n }\n else {\n if (((_a = notEnrichedSuccessSignInResult.noSuccess) === null || _a === void 0 ? void 0 : _a.noSuccessReasonCode) === 'SIGN_IN_CANCELLED') {\n // console.log('User cancelled sign in. Waiting for next sign in attempt.');\n }\n }\n }\n catch (e) {\n reject(e);\n }\n };\n androidAndIosButtonElem.onclick = onClickAction;\n parentElem.appendChild(androidAndIosButtonElem);\n }\n catch (e) {\n reject(e);\n }\n });\n }\n getNonce() {\n assert(() => !!this.nonce, `The nonce is only set after ${() => this.initialize} was called.`);\n return this.nonce;\n }\n enrichOptionResultWithDecodedIdToken(signInResultOption) {\n if (signInResultOption.isSuccess === false) {\n return signInResultOption;\n }\n return Object.assign(Object.assign({}, signInResultOption), { success: this.enrichSuccessResultWithDecodedIdToken(signInResultOption.success) });\n }\n enrichSuccessResultWithDecodedIdToken(successSignInResult) {\n const decodedJwt = jwtDecode(successSignInResult.idToken);\n return Object.assign(Object.assign({}, successSignInResult), { decodedIdToken: decodedJwt, userId: decodedJwt.sub, email: decodedJwt.email });\n }\n getSignInButtonHtml(gsiButtonConfiguration) {\n var _a;\n // Note: Replacing double quotes with single quotes will break some strings.\n const localizedStrings = {\n en: { signin: 'Sign in', continue_with: 'Continue with Google', signin_with: 'Sign in with Google', signup_with: 'Sign up with Google' },\n ar: { signin: '\\u062a\\u0633\\u062c\\u064a\\u0644 \\u0627\\u0644\\u062f\\u062e\\u0648\\u0644', continue_with: '\\u0627\\u0644\\u0645\\u0648\\u0627\\u0635\\u0644\\u0629 \\u0628\\u0627\\u0633\\u062a\\u062e\\u062f\\u0627\\u0645 Google', signin_with: '\\u062a\\u0633\\u062c\\u064a\\u0644 \\u0627\\u0644\\u062f\\u062e\\u0648\\u0644 \\u0628\\u0627\\u0633\\u062a\\u062e\\u062f\\u0627\\u0645 Google', signup_with: '\\u0627\\u0644\\u0627\\u0634\\u062a\\u0631\\u0627\\u0643 \\u0645\\u0646 \\u062e\\u0644\\u0627\\u0644 Google' },\n sr: { signin: '\\u041f\\u0440\\u0438\\u0458\\u0430\\u0432\\u0438 \\u043c\\u0435', continue_with: '\\u041d\\u0430\\u0441\\u0442\\u0430\\u0432\\u0438\\u0442\\u0435 \\u0441\\u0430 Google-\\u043e\\u043c', signin_with: '\\u041f\\u0440\\u0438\\u0458\\u0430\\u0432\\u0438\\u0442\\u0435 \\u0441\\u0435 \\u043f\\u043e\\u043c\\u043e\\u045b\\u0443 Google-\\u0430', signup_with: '\\u0420\\u0435\\u0433\\u0438\\u0441\\u0442\\u0440\\u0443\\u0458\\u0442\\u0435 \\u0441\\u0435 \\u043f\\u043e\\u043c\\u043e\\u045b\\u0443 Google-\\u0430' },\n nb: { signin: 'Logg p\\u00e5', continue_with: 'Fortsett med Google', signin_with: 'Logg p\\u00e5 med Google', signup_with: 'Registrer deg med Google' },\n pl: { signin: 'Zaloguj si\\u0119', continue_with: 'Kontynuuj przy u\\u017cyciu konta Google', signin_with: 'Zaloguj si\\u0119 przez Google', signup_with: 'Zarejestruj si\\u0119 przez Google' },\n vi: { signin: '\\u0110\\u0103ng nh\\u1eadp', continue_with: 'Ti\\u1ebfp t\\u1ee5c truy c\\u1eadp Google', signin_with: '\\u0110\\u0103ng nh\\u00e2\\u0323p b\\u0103\\u0300ng Google', signup_with: '\\u0110\\u0103ng k\\u00fd b\\u1eb1ng Google' },\n cs: { signin: 'P\\u0159ihl\\u00e1sit se', continue_with: 'Pokra\\u010dovat pomoc\\u00ed Googlu', signin_with: \"P\\u0159ihl\\u00e1sit se p\\u0159es Google\", signup_with: 'Registrace pomoc\\u00ed Googlu' },\n id: { signin: 'Login', continue_with: 'Lanjutkan dengan Google', signin_with: 'Login dengan Google', signup_with: 'Daftar dengan Google' },\n nl: { signin: 'Inloggen', continue_with: 'Doorgaan met Google', signin_with: 'Inloggen met Google', signup_with: 'Aanmelden bij Google' },\n gl: { signin: 'Iniciar sesi\\u00f3n', continue_with: 'Continuar con Google', signin_with: 'Iniciar sesi\\u00f3n con Google', signup_with: 'Iniciar sesi\\u00f3n con Google' },\n sv: { signin: 'Logga in', continue_with: 'Forts\\u00e4tt med Google', signin_with: 'Logga in med Google', signup_with: 'Registrera dig med Google' },\n lv: { signin: 'Pierakst\\u012b\\u0161an\\u0101s', continue_with: 'Turpin\\u0101t darbu ar Google', signin_with: 'Pierakstieties ar Google', signup_with: 'Re\\u0123istr\\u0113\\u0161an\\u0101s, izmantojot Google' },\n tr: { signin: 'Oturum a\\u00e7\\u0131n', continue_with: 'Google ile devam edin', signin_with: 'Google ile oturum a\\u00e7\\u0131n', signup_with: 'Google ile kaydolun' },\n it: { signin: 'Accedi', continue_with: 'Continua con Google', signin_with: 'Accedi con Google', signup_with: 'Registrati con Google' },\n sq: { signin: 'Identifikohu', continue_with: 'Vazhdo me Google', signin_with: 'Identifikohu me Google', signup_with: 'Regjistrohu me Google' },\n ro: { signin: 'Conecteaz\\u0103-te', continue_with: 'Continu\\u0103 cu Google', signin_with: 'Conecteaz\\u0103-te cu Google', signup_with: '\\u00censcrie-te cu Google' },\n de: { signin: 'Anmelden', continue_with: 'Weiter mit Google', signin_with: '\\u00dcber Google anmelden', signup_with: 'Mit Google anmelden' },\n ko: { signin: '\\ub85c\\uadf8\\uc778', continue_with: 'Google \\uacc4\\uc815\\uc73c\\ub85c \\uacc4\\uc18d\\ud558\\uae30', signin_with: 'Google \\uacc4\\uc815\\uc73c\\ub85c \\ub85c\\uadf8\\uc778', signup_with: 'Google \\uacc4\\uc815\\uc73c\\ub85c \\uac00\\uc785\\ud558\\uae30' },\n fr: { signin: 'Se connecter', continue_with: 'Continuer avec Google', signin_with: 'Se connecter avec Google', signup_with: \"S'inscrire avec Google\" },\n kmr: { signin: 'Oturum a\\u00e7\\u0131n', continue_with: 'Google ile devam edin', signin_with: 'Google ile oturum a\\u00e7\\u0131n', signup_with: 'Google ile kaydolun' },\n zh: { signin: '\\u767b\\u5f55', continue_with: '\\u901a\\u8fc7 Google \\u7ee7\\u7eed\\u64cd\\u4f5c', signin_with: \"\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u767b\\u5f55\", signup_with: '\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u6ce8\\u518c' },\n 'zh-CN': { signin: '\\u767b\\u5f55', continue_with: '\\u901a\\u8fc7 Google \\u7ee7\\u7eed\\u64cd\\u4f5c', signin_with: \"\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u767b\\u5f55\", signup_with: '\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u6ce8\\u518c' },\n 'zh-HK': { signin: '\\u767b\\u5165', continue_with: '\\u7e7c\\u7e8c\\u900f\\u904e Google \\u5e33\\u6236\\u64cd\\u4f5c', signin_with: '\\u4f7f\\u7528 Google \\u5e33\\u6236\\u767b\\u5165', signup_with: '\\u4f7f\\u7528 Google \\u5e33\\u6236\\u8a3b\\u518a' },\n pt: { signin: 'Fazer login', continue_with: 'Continuar com o Google', signin_with: 'Fazer login com o Google', signup_with: 'Inscrever-se no Google' },\n es: { signin: 'Iniciar sesi\\u00f3n', continue_with: 'Continuar con Google', signin_with: 'Iniciar sesi\\u00f3n con Google', signup_with: 'Registrarse con Google' },\n };\n const locale = gsiButtonConfiguration === null || gsiButtonConfiguration === void 0 ? void 0 : gsiButtonConfiguration.locale;\n let localeTexts = locale !== undefined && locale in localizedStrings ? (localizedStrings[locale]) : undefined;\n if (localeTexts === undefined) {\n const countryCode = (locale === null || locale === void 0 ? void 0 : locale.includes('-')) === true ? locale.split('-')[1] : (locale !== null && locale !== void 0 ? locale : '');\n localeTexts = countryCode in localizedStrings ? localizedStrings[countryCode] : localizedStrings['en'];\n }\n const text = (_a = gsiButtonConfiguration === null || gsiButtonConfiguration === void 0 ? void 0 : gsiButtonConfiguration.text) !== null && _a !== void 0 ? _a : 'signin_with';\n const buttonText = localeTexts[text];\n // HTML from https://github.com/inouiw/ReactSignInWithGoogleButton\n const button = document.createElement('button');\n button.setAttribute(\"style\", \"border-radius: 4px; background-color: rgb(255, 255, 255); border: 1px solid rgb(218, 220, 224); color: rgb(60, 64, 67); cursor: pointer; font-family: Roboto, Verdana; font-weight: 500; font-size: 14px; height: 40px; letter-spacing: 0.25px; padding: 0px 12px; position: relative; text-align: center; vertical-align: middle; width: auto;\");\n button.innerHTML = `\n <div style=\"display: flex; align-items: center; flex-flow: row nowrap; justify-content: space-between; height: 100%; position: relative; width: 100%;\">\n <div style=\"height: 18px; margin-right: 8px; min-width: 18px; width: 18px;\">\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"18px\" height=\"18px\" viewBox=\"0 0 48 48\">\n <g>\n <path fill=\"#EA4335\" d=\"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z\"></path>\n <path fill=\"#4285F4\" d=\"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z\"></path>\n <path fill=\"#FBBC05\" d=\"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z\"></path>\n <path fill=\"#34A853\" d=\"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z\"></path>\n <path fill=\"none\" d=\"M0 0h48v48H0z\"></path>\n </g>\n </svg>\n </div>\n <p>${buttonText}</p>\n </div>`;\n return button;\n }\n}\nconst googleOneTapAuth = new GoogleOneTapAuth();\nexport { googleOneTapAuth as GoogleOneTapAuth };\n//# sourceMappingURL=GoogleOneTapAuth.js.map"],"names":["WebPlugin","registerPlugin","Capacitor","jwtDecode"],"mappings":";;;;;AAAO,SAAS,MAAM,CAAC,SAAS,EAAE,aAAa,EAAE;AACjD,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE;AACtB,QAAQ,MAAM,UAAU,GAAG,mBAAmB,EAAE,CAAC;AACjD,QAAQ,IAAI,aAAa,IAAI,SAAS,EAAE;AACxC,YAAY,MAAM,KAAK,CAAC,aAAa,GAAG,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE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,YAAY,CAAC,CAAC;AACd,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK;AACL,CAAC;AACI,MAAC,gBAAgB,GAAG,IAAI,gBAAgB;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -36,6 +36,12 @@ var capacitorNativeGoogleOneTapSignin = (function (exports, core, jwtDecode) {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
var FedCMSignInResult;
|
|
40
|
+
(function (FedCMSignInResult) {
|
|
41
|
+
FedCMSignInResult[FedCMSignInResult["SUCCESS"] = 0] = "SUCCESS";
|
|
42
|
+
FedCMSignInResult[FedCMSignInResult["CANCELLED"] = 1] = "CANCELLED";
|
|
43
|
+
FedCMSignInResult[FedCMSignInResult["OTHER_ERROR"] = 2] = "OTHER_ERROR";
|
|
44
|
+
})(FedCMSignInResult || (FedCMSignInResult = {}));
|
|
39
45
|
// See https://developers.google.com/identity/gsi/web/guides/use-one-tap-js-api
|
|
40
46
|
class GoogleOneTapAuthWeb extends core.WebPlugin {
|
|
41
47
|
constructor() {
|
|
@@ -45,6 +51,7 @@ var capacitorNativeGoogleOneTapSignin = (function (exports, core, jwtDecode) {
|
|
|
45
51
|
this.initializeOptions = undefined;
|
|
46
52
|
this.isGapiLoadRequested = false;
|
|
47
53
|
this.fedCMAbortController = undefined;
|
|
54
|
+
this.cancelCalledAbortReason = 'CANCEL_CALLED';
|
|
48
55
|
}
|
|
49
56
|
async initialize(options) {
|
|
50
57
|
this.initializeOptions = options;
|
|
@@ -56,7 +63,9 @@ var capacitorNativeGoogleOneTapSignin = (function (exports, core, jwtDecode) {
|
|
|
56
63
|
}
|
|
57
64
|
async tryAutoOrOneTapSignIn() {
|
|
58
65
|
let signInResult = await this.doSignIn(true);
|
|
59
|
-
if (!signInResult.idToken
|
|
66
|
+
if (!signInResult.idToken
|
|
67
|
+
// If the popup was cancelled, do not show it again.
|
|
68
|
+
&& signInResult.noSuccessReasonCode !== 'SIGN_IN_CANCELLED') {
|
|
60
69
|
signInResult = await this.doSignIn(false);
|
|
61
70
|
}
|
|
62
71
|
if (signInResult.idToken) {
|
|
@@ -116,9 +125,11 @@ var capacitorNativeGoogleOneTapSignin = (function (exports, core, jwtDecode) {
|
|
|
116
125
|
return signInPromise;
|
|
117
126
|
}
|
|
118
127
|
async fedCMSignIn(autoSelect, resolveSignInFunc) {
|
|
128
|
+
var _a, _b;
|
|
119
129
|
try {
|
|
130
|
+
// console.log(`IdentityCredential supported: ${'IdentityCredential' in window}`);
|
|
120
131
|
if ('IdentityCredential' in window === false) {
|
|
121
|
-
return
|
|
132
|
+
return FedCMSignInResult.OTHER_ERROR;
|
|
122
133
|
}
|
|
123
134
|
this.fedCMAbortController = new AbortController();
|
|
124
135
|
// see https://developers.google.com/privacy-sandbox/3pcd/fedcm
|
|
@@ -140,21 +151,30 @@ var capacitorNativeGoogleOneTapSignin = (function (exports, core, jwtDecode) {
|
|
|
140
151
|
});
|
|
141
152
|
// console.log('fedCMSignIn result: ', identityCredential);
|
|
142
153
|
if (!(identityCredential === null || identityCredential === void 0 ? void 0 : identityCredential.token)) {
|
|
143
|
-
return
|
|
154
|
+
return FedCMSignInResult.OTHER_ERROR;
|
|
144
155
|
}
|
|
145
156
|
resolveSignInFunc({
|
|
146
157
|
idToken: identityCredential.token,
|
|
147
158
|
isAutoSelect: identityCredential.isAutoSelect
|
|
148
159
|
});
|
|
149
|
-
return
|
|
160
|
+
return FedCMSignInResult.SUCCESS;
|
|
150
161
|
}
|
|
151
162
|
catch (e) {
|
|
152
163
|
// NotSupportedError DOMException
|
|
153
164
|
// IdentityCredentialError DOMException
|
|
154
|
-
// NetworkError DOMException
|
|
165
|
+
// NetworkError DOMException --> name: 'NetworkError'
|
|
155
166
|
// NotAllowedError DOMException
|
|
156
|
-
|
|
157
|
-
|
|
167
|
+
const name = (_a = e.name) !== null && _a !== void 0 ? _a : '';
|
|
168
|
+
const message = (_b = e.message) !== null && _b !== void 0 ? _b : '';
|
|
169
|
+
// console.log('fedCMSignIn error: ', e, name);
|
|
170
|
+
if (message.includes(this.cancelCalledAbortReason)
|
|
171
|
+
|| (name === 'NetworkError' && message.includes('Error retrieving a token.'))) {
|
|
172
|
+
return FedCMSignInResult.CANCELLED;
|
|
173
|
+
}
|
|
174
|
+
return FedCMSignInResult.OTHER_ERROR;
|
|
175
|
+
}
|
|
176
|
+
finally {
|
|
177
|
+
this.fedCMAbortController = undefined;
|
|
158
178
|
}
|
|
159
179
|
}
|
|
160
180
|
fedCMSignOut() {
|
|
@@ -162,11 +182,15 @@ var capacitorNativeGoogleOneTapSignin = (function (exports, core, jwtDecode) {
|
|
|
162
182
|
}
|
|
163
183
|
fedCMAbort() {
|
|
164
184
|
var _a;
|
|
165
|
-
(_a = this.fedCMAbortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
185
|
+
(_a = this.fedCMAbortController) === null || _a === void 0 ? void 0 : _a.abort({ message: this.cancelCalledAbortReason });
|
|
166
186
|
}
|
|
167
187
|
async doSignIn(autoSelect) {
|
|
168
188
|
var signInPromise = new Promise(async (resolve, _reject) => {
|
|
169
|
-
|
|
189
|
+
let fedCMResult = await this.fedCMSignIn(autoSelect, resolve);
|
|
190
|
+
if (fedCMResult === FedCMSignInResult.CANCELLED) {
|
|
191
|
+
resolve({ noSuccessReasonCode: 'SIGN_IN_CANCELLED' });
|
|
192
|
+
}
|
|
193
|
+
else if (fedCMResult === FedCMSignInResult.OTHER_ERROR) {
|
|
170
194
|
this.oneTapInitialize(autoSelect, resolve); // The resolve function is passed, so it can be called in handleCredentialResponse.
|
|
171
195
|
google.accounts.id.prompt();
|
|
172
196
|
}
|
|
@@ -196,10 +220,8 @@ var capacitorNativeGoogleOneTapSignin = (function (exports, core, jwtDecode) {
|
|
|
196
220
|
resolveSignInFunc(signInResult);
|
|
197
221
|
}
|
|
198
222
|
cancelOneTapDialog() {
|
|
199
|
-
if (this.isGapiLoadRequested === false) {
|
|
200
|
-
this.fedCMAbort();
|
|
201
|
-
}
|
|
202
223
|
google.accounts.id.cancel();
|
|
224
|
+
this.fedCMAbort();
|
|
203
225
|
}
|
|
204
226
|
signOut(authenticatedUserId) {
|
|
205
227
|
if (this.isGapiLoadRequested === false) {
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/helpers.js","esm/web.js","esm/GoogleOneTapAuth.js"],"sourcesContent":["export function assert(predicate, customMessage) {\n if (!predicate()) {\n const callerName = callingFunctionName();\n if (customMessage != undefined) {\n throw Error(customMessage + `. Error in ${callerName}.`);\n }\n throw Error(`Assert error, expected '${predicate}' to be true. Error in ${callerName}.`);\n }\n}\nexport function randomHexString(length) {\n let uint8RandomNumbers = new Uint8Array((length / 2) + 1);\n uint8RandomNumbers = crypto.getRandomValues(uint8RandomNumbers);\n const numbersAsHexString = Array.from(uint8RandomNumbers).map(x => x.toString(16)).join('');\n return numbersAsHexString.substring(0, length);\n}\nfunction callingFunctionName() {\n var _a;\n try {\n return (_a = (new Error()).stack) === null || _a === void 0 ? void 0 : _a.split(\"\\n\")[3].trim().split(\" \")[1];\n }\n catch (_b) {\n // ignore.\n }\n}\nexport function loadScript(url) {\n return new Promise((resolve, reject) => {\n var scriptEl = document.createElement('script');\n scriptEl.async = true;\n scriptEl.onerror = () => reject();\n scriptEl.onload = () => resolve();\n scriptEl.src = url;\n document.getElementsByTagName('head')[0].appendChild(scriptEl);\n });\n}\n//# sourceMappingURL=helpers.js.map","import { WebPlugin } from '@capacitor/core';\nimport { assert, loadScript } from './helpers';\n// See https://developers.google.com/identity/gsi/web/guides/use-one-tap-js-api\nexport class GoogleOneTapAuthWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.gsiScriptUrl = 'https://accounts.google.com/gsi/client';\n this.gapiLoadedPromise = undefined;\n this.initializeOptions = undefined;\n this.isGapiLoadRequested = false;\n this.fedCMAbortController = undefined;\n }\n async initialize(options) {\n this.initializeOptions = options;\n if (!this.gapiLoadedPromise) {\n this.gapiLoadedPromise = loadScript(this.gsiScriptUrl);\n this.isGapiLoadRequested = true;\n }\n return this.gapiLoadedPromise;\n }\n async tryAutoOrOneTapSignIn() {\n let signInResult = await this.doSignIn(true);\n if (!signInResult.idToken) {\n signInResult = await this.doSignIn(false);\n }\n if (signInResult.idToken) {\n return {\n isSuccess: true,\n success: signInResult\n };\n }\n else {\n return {\n isSuccess: false,\n noSuccess: signInResult\n };\n }\n }\n async tryOneTapSignIn() {\n let signInResult = await this.doSignIn(false);\n if (signInResult.idToken) {\n return {\n isSuccess: true,\n success: signInResult\n };\n }\n else {\n return {\n isSuccess: false,\n noSuccess: signInResult\n };\n }\n }\n async tryAutoSignIn() {\n let signInResult = await this.doSignIn(true);\n if (signInResult.idToken) {\n return {\n isSuccess: true,\n success: signInResult\n };\n }\n else {\n return {\n isSuccess: false,\n noSuccess: signInResult\n };\n }\n }\n async renderSignInButton(parentElementId, options, gsiButtonConfiguration) {\n const parentElem = document.getElementById(parentElementId);\n assert(() => !!parentElem);\n var signInPromise = new Promise((resolve) => {\n this.oneTapInitialize(false, resolve, options.webOptions);\n // // Adding a click_listener allows to detect when the popup is opened.\n // (gsiButtonConfiguration as any).click_listener = () => {\n // console.log('click_listener');\n // };\n google.accounts.id.renderButton(parentElem, gsiButtonConfiguration);\n });\n return signInPromise;\n }\n async fedCMSignIn(autoSelect, resolveSignInFunc) {\n try {\n if ('IdentityCredential' in window === false) {\n return false;\n }\n this.fedCMAbortController = new AbortController();\n // see https://developers.google.com/privacy-sandbox/3pcd/fedcm\n // see https://developers.google.com/privacy-sandbox/blog/fedcm-auto-reauthn\n const identityCredential = await navigator.credentials.get({\n identity: {\n context: 'signin',\n providers: [\n {\n configURL: 'https://accounts.google.com/gsi/fedcm.json',\n clientId: this.initializeOptions.clientId,\n // loginHint: ''\n nonce: this.initializeOptions.nonce\n }\n ]\n },\n mediation: autoSelect ? 'optional' : 'required',\n signal: this.fedCMAbortController.signal\n });\n // console.log('fedCMSignIn result: ', identityCredential);\n if (!(identityCredential === null || identityCredential === void 0 ? void 0 : identityCredential.token)) {\n return false;\n }\n resolveSignInFunc({\n idToken: identityCredential.token,\n isAutoSelect: identityCredential.isAutoSelect\n });\n return true;\n }\n catch (e) {\n // NotSupportedError DOMException\n // IdentityCredentialError DOMException\n // NetworkError DOMException\n // NotAllowedError DOMException\n // console.error('fedCMSignIn Error: ', e);\n return false;\n }\n }\n fedCMSignOut() {\n navigator.credentials.preventSilentAccess();\n }\n fedCMAbort() {\n var _a;\n (_a = this.fedCMAbortController) === null || _a === void 0 ? void 0 : _a.abort();\n }\n async doSignIn(autoSelect) {\n var signInPromise = new Promise(async (resolve, _reject) => {\n if (await this.fedCMSignIn(autoSelect, resolve) === false) {\n this.oneTapInitialize(autoSelect, resolve); // The resolve function is passed, so it can be called in handleCredentialResponse.\n google.accounts.id.prompt();\n }\n });\n return signInPromise;\n }\n oneTapInitialize(autoSelect, resolveSignInFunc, buttonWebOptions) {\n var _a;\n google.accounts.id.initialize({\n client_id: this.initializeOptions.clientId,\n callback: (credentialResponse) => this.handleCredentialResponse(credentialResponse, resolveSignInFunc),\n auto_select: autoSelect,\n itp_support: (buttonWebOptions === null || buttonWebOptions === void 0 ? void 0 : buttonWebOptions.itpSupport) || false,\n cancel_on_tap_outside: ((_a = this.initializeOptions.webOptions) === null || _a === void 0 ? void 0 : _a.cancelOnTapOutside) || true,\n ux_mode: (buttonWebOptions === null || buttonWebOptions === void 0 ? void 0 : buttonWebOptions.uxMode) || 'popup',\n nonce: this.initializeOptions.nonce,\n use_fedcm_for_prompt: true,\n use_fedcm_for_button: true\n // log_level: 'debug'\n });\n }\n handleCredentialResponse(credentialResponse, resolveSignInFunc) {\n let signInResult = {\n idToken: credentialResponse.credential,\n isAutoSelect: credentialResponse.isAutoSelect,\n };\n resolveSignInFunc(signInResult);\n }\n cancelOneTapDialog() {\n if (this.isGapiLoadRequested === false) {\n this.fedCMAbort();\n }\n google.accounts.id.cancel();\n }\n signOut(authenticatedUserId) {\n if (this.isGapiLoadRequested === false) {\n this.fedCMSignOut();\n return Promise.resolve({ isSuccess: true });\n }\n return new Promise((resolve) => {\n if (authenticatedUserId) {\n // Calling revoke method revokes all OAuth2 scopes previously granted by the Sign In With Google client library.\n google.accounts.id.revoke(authenticatedUserId, response => {\n if (response.successful) {\n resolve({ isSuccess: true });\n }\n else {\n resolve({ isSuccess: false, error: response.error });\n }\n });\n }\n else {\n resolve({ isSuccess: true });\n }\n });\n }\n}\n//# sourceMappingURL=web.js.map","import { Capacitor, registerPlugin } from '@capacitor/core';\nimport { assert, randomHexString } from './helpers';\nimport { GoogleOneTapAuthWeb } from './web';\nimport { jwtDecode } from \"jwt-decode\";\nconst GoogleOneTapAuthPlatform = registerPlugin('GoogleOneTapAuth', {\n web: () => new GoogleOneTapAuthWeb(),\n});\nvar InitializeStatus;\n(function (InitializeStatus) {\n InitializeStatus[InitializeStatus[\"NotInitialized\"] = 0] = \"NotInitialized\";\n InitializeStatus[InitializeStatus[\"Initializing\"] = 1] = \"Initializing\";\n InitializeStatus[InitializeStatus[\"Initialized\"] = 2] = \"Initialized\";\n})(InitializeStatus || (InitializeStatus = {}));\n// This file is the entry point for all plugin methods. It contains common logic to web, android, iOS or delegates to the specific implementation.\nclass GoogleOneTapAuth {\n constructor() {\n this.initializeStatus = InitializeStatus.NotInitialized;\n this.authenticatedUserId = undefined;\n this.isInitializedPromise = new Promise((resolve) => {\n this.resolveIsInitializedPromise = resolve;\n });\n }\n /// Performs common or one-time initialization. Can be called multiple times.\n initialize(options) {\n if (this.initializeStatus === InitializeStatus.NotInitialized) {\n this.initializeStatus = InitializeStatus.Initializing;\n if (!options.clientId || options.clientId.endsWith(\"apps.googleusercontent.com\") == false) {\n throw new Error(\"clientId must end with 'apps.googleusercontent.com' but is: \" + options.clientId);\n }\n this.nonce = options.nonce = options.nonce || randomHexString(10);\n GoogleOneTapAuthPlatform.initialize(options).then(() => {\n this.initializeStatus = InitializeStatus.Initialized;\n this.resolveIsInitializedPromise();\n });\n }\n return this.isInitializedPromise;\n }\n async ensureInitialized() {\n assert(() => this.initializeStatus !== InitializeStatus.NotInitialized, 'Must call initialize first.');\n if (this.initializeStatus === InitializeStatus.Initializing) {\n await this.isInitializedPromise;\n }\n }\n async tryAutoOrOneTapSignIn() {\n await this.ensureInitialized();\n const notEnrichtedSignInResultOption = await GoogleOneTapAuthPlatform.tryAutoOrOneTapSignIn();\n const enrichtedSignInResultOption = this.enrichOptionResultWithDecodedIdToken(notEnrichtedSignInResultOption);\n this.onResultReceived(enrichtedSignInResultOption);\n return enrichtedSignInResultOption;\n }\n async tryOneTapSignIn() {\n await this.ensureInitialized();\n const notEnrichtedSignInResultOption = await GoogleOneTapAuthPlatform.tryOneTapSignIn();\n const enrichtedSignInResultOption = this.enrichOptionResultWithDecodedIdToken(notEnrichtedSignInResultOption);\n this.onResultReceived(enrichtedSignInResultOption);\n return enrichtedSignInResultOption;\n }\n async tryAutoSignIn() {\n await this.ensureInitialized();\n const notEnrichtedSignInResultOption = await GoogleOneTapAuthPlatform.tryAutoSignIn();\n const enrichtedSignInResultOption = this.enrichOptionResultWithDecodedIdToken(notEnrichtedSignInResultOption);\n this.onResultReceived(enrichtedSignInResultOption);\n return enrichtedSignInResultOption;\n }\n onResultReceived(signInResultOption) {\n if (signInResultOption.isSuccess) {\n this.authenticatedUserId = signInResultOption.success.userId;\n }\n }\n cancelOneTapDialog() {\n GoogleOneTapAuthPlatform.cancelOneTapDialog();\n }\n async signOut() {\n const result = await GoogleOneTapAuthPlatform.signOut(this.authenticatedUserId);\n this.authenticatedUserId = undefined;\n return result;\n }\n async addSignInActionToExistingButton(buttonParentId, buttonId) {\n await this.ensureInitialized();\n const buttonParentElem = document.getElementById(buttonParentId);\n const buttonElem = document.getElementById(buttonId);\n assert(() => !!buttonParentElem);\n assert(() => !!buttonElem);\n if (Capacitor.getPlatform() === 'web') {\n buttonParentElem.style.position = 'relative';\n buttonParentElem.style.overflow = 'hidden';\n // buttonParentElem!.style.border = '2px solid red'; // uncomment for debugging\n // The visible button width should be the same as the google button width.\n const buttonElemWidth = await this.waitForElementOffsetWidthNotZero(buttonElem);\n assert(() => buttonElemWidth !== 0);\n const invisibleGoogleButtonDiv = document.createElement('div');\n const invisibleGoogleButtonDivId = 'invisibleGoogleButtonDiv';\n invisibleGoogleButtonDiv.setAttribute('id', invisibleGoogleButtonDivId);\n invisibleGoogleButtonDiv.style.position = 'absolute';\n invisibleGoogleButtonDiv.style.top = '0px';\n invisibleGoogleButtonDiv.style.left = '0px';\n invisibleGoogleButtonDiv.style.width = `${buttonElemWidth}px`;\n invisibleGoogleButtonDiv.style.boxSizing = 'border-box';\n invisibleGoogleButtonDiv.style.opacity = '0.0001'; // change it for debugging\n buttonElem.appendChild(invisibleGoogleButtonDiv);\n return await this._doRenderSignInButton(invisibleGoogleButtonDivId, {}, { width: buttonElemWidth }, buttonElem);\n }\n else {\n return await this._doRenderSignInButton(buttonParentId, {}, {}, buttonElem);\n }\n }\n waitForElementOffsetWidthNotZero(element) {\n if (element.offsetWidth !== 0) {\n return Promise.resolve(element.offsetWidth);\n }\n return new Promise((resolve) => {\n const resizeObserver = new ResizeObserver(() => {\n if (element.offsetWidth !== 0) {\n resolve(element.offsetWidth);\n }\n });\n resizeObserver.observe(element);\n });\n }\n async renderSignInButton(parentElementId, options, gsiButtonConfiguration) {\n const androidAndIosButtonElem = this.getSignInButtonHtml(gsiButtonConfiguration);\n return this._doRenderSignInButton(parentElementId, options, gsiButtonConfiguration, androidAndIosButtonElem);\n }\n async _doRenderSignInButton(parentElementId, options, gsiButtonConfiguration, androidAndIosButtonElem) {\n await this.ensureInitialized();\n const parentElem = document.getElementById(parentElementId);\n assert(() => !!parentElem);\n options.webOptions = options.webOptions || {};\n return new Promise(async (resolve, reject) => {\n try {\n if (Capacitor.getPlatform() === 'web') {\n const notEnrichedSuccessSignInResult = await GoogleOneTapAuthPlatform.renderSignInButton(parentElementId, options, gsiButtonConfiguration);\n const enrichtedSuccessSignInResult = this.enrichSuccessResultWithDecodedIdToken(notEnrichedSuccessSignInResult);\n this.authenticatedUserId = enrichtedSuccessSignInResult.userId;\n resolve(enrichtedSuccessSignInResult);\n return;\n }\n const onClickAction = async () => {\n var _a;\n try {\n const notEnrichedSuccessSignInResult = await GoogleOneTapAuthPlatform.triggerGoogleSignIn(options);\n if (notEnrichedSuccessSignInResult.isSuccess) {\n const enrichtedSuccessSignInResult = this.enrichSuccessResultWithDecodedIdToken(notEnrichedSuccessSignInResult.success);\n this.authenticatedUserId = enrichtedSuccessSignInResult.userId;\n resolve(enrichtedSuccessSignInResult);\n }\n else {\n if (((_a = notEnrichedSuccessSignInResult.noSuccess) === null || _a === void 0 ? void 0 : _a.noSuccessReasonCode) === 'SIGN_IN_CANCELLED') {\n // console.log('User cancelled sign in. Waiting for next sign in attempt.');\n }\n }\n }\n catch (e) {\n reject(e);\n }\n };\n androidAndIosButtonElem.onclick = onClickAction;\n parentElem.appendChild(androidAndIosButtonElem);\n }\n catch (e) {\n reject(e);\n }\n });\n }\n getNonce() {\n assert(() => !!this.nonce, `The nonce is only set after ${() => this.initialize} was called.`);\n return this.nonce;\n }\n enrichOptionResultWithDecodedIdToken(signInResultOption) {\n if (signInResultOption.isSuccess === false) {\n return signInResultOption;\n }\n return Object.assign(Object.assign({}, signInResultOption), { success: this.enrichSuccessResultWithDecodedIdToken(signInResultOption.success) });\n }\n enrichSuccessResultWithDecodedIdToken(successSignInResult) {\n const decodedJwt = jwtDecode(successSignInResult.idToken);\n return Object.assign(Object.assign({}, successSignInResult), { decodedIdToken: decodedJwt, userId: decodedJwt.sub, email: decodedJwt.email });\n }\n getSignInButtonHtml(gsiButtonConfiguration) {\n var _a;\n // Note: Replacing double quotes with single quotes will break some strings.\n const localizedStrings = {\n en: { signin: 'Sign in', continue_with: 'Continue with Google', signin_with: 'Sign in with Google', signup_with: 'Sign up with Google' },\n ar: { signin: '\\u062a\\u0633\\u062c\\u064a\\u0644 \\u0627\\u0644\\u062f\\u062e\\u0648\\u0644', continue_with: '\\u0627\\u0644\\u0645\\u0648\\u0627\\u0635\\u0644\\u0629 \\u0628\\u0627\\u0633\\u062a\\u062e\\u062f\\u0627\\u0645 Google', signin_with: '\\u062a\\u0633\\u062c\\u064a\\u0644 \\u0627\\u0644\\u062f\\u062e\\u0648\\u0644 \\u0628\\u0627\\u0633\\u062a\\u062e\\u062f\\u0627\\u0645 Google', signup_with: '\\u0627\\u0644\\u0627\\u0634\\u062a\\u0631\\u0627\\u0643 \\u0645\\u0646 \\u062e\\u0644\\u0627\\u0644 Google' },\n sr: { signin: '\\u041f\\u0440\\u0438\\u0458\\u0430\\u0432\\u0438 \\u043c\\u0435', continue_with: '\\u041d\\u0430\\u0441\\u0442\\u0430\\u0432\\u0438\\u0442\\u0435 \\u0441\\u0430 Google-\\u043e\\u043c', signin_with: '\\u041f\\u0440\\u0438\\u0458\\u0430\\u0432\\u0438\\u0442\\u0435 \\u0441\\u0435 \\u043f\\u043e\\u043c\\u043e\\u045b\\u0443 Google-\\u0430', signup_with: '\\u0420\\u0435\\u0433\\u0438\\u0441\\u0442\\u0440\\u0443\\u0458\\u0442\\u0435 \\u0441\\u0435 \\u043f\\u043e\\u043c\\u043e\\u045b\\u0443 Google-\\u0430' },\n nb: { signin: 'Logg p\\u00e5', continue_with: 'Fortsett med Google', signin_with: 'Logg p\\u00e5 med Google', signup_with: 'Registrer deg med Google' },\n pl: { signin: 'Zaloguj si\\u0119', continue_with: 'Kontynuuj przy u\\u017cyciu konta Google', signin_with: 'Zaloguj si\\u0119 przez Google', signup_with: 'Zarejestruj si\\u0119 przez Google' },\n vi: { signin: '\\u0110\\u0103ng nh\\u1eadp', continue_with: 'Ti\\u1ebfp t\\u1ee5c truy c\\u1eadp Google', signin_with: '\\u0110\\u0103ng nh\\u00e2\\u0323p b\\u0103\\u0300ng Google', signup_with: '\\u0110\\u0103ng k\\u00fd b\\u1eb1ng Google' },\n cs: { signin: 'P\\u0159ihl\\u00e1sit se', continue_with: 'Pokra\\u010dovat pomoc\\u00ed Googlu', signin_with: \"P\\u0159ihl\\u00e1sit se p\\u0159es Google\", signup_with: 'Registrace pomoc\\u00ed Googlu' },\n id: { signin: 'Login', continue_with: 'Lanjutkan dengan Google', signin_with: 'Login dengan Google', signup_with: 'Daftar dengan Google' },\n nl: { signin: 'Inloggen', continue_with: 'Doorgaan met Google', signin_with: 'Inloggen met Google', signup_with: 'Aanmelden bij Google' },\n gl: { signin: 'Iniciar sesi\\u00f3n', continue_with: 'Continuar con Google', signin_with: 'Iniciar sesi\\u00f3n con Google', signup_with: 'Iniciar sesi\\u00f3n con Google' },\n sv: { signin: 'Logga in', continue_with: 'Forts\\u00e4tt med Google', signin_with: 'Logga in med Google', signup_with: 'Registrera dig med Google' },\n lv: { signin: 'Pierakst\\u012b\\u0161an\\u0101s', continue_with: 'Turpin\\u0101t darbu ar Google', signin_with: 'Pierakstieties ar Google', signup_with: 'Re\\u0123istr\\u0113\\u0161an\\u0101s, izmantojot Google' },\n tr: { signin: 'Oturum a\\u00e7\\u0131n', continue_with: 'Google ile devam edin', signin_with: 'Google ile oturum a\\u00e7\\u0131n', signup_with: 'Google ile kaydolun' },\n it: { signin: 'Accedi', continue_with: 'Continua con Google', signin_with: 'Accedi con Google', signup_with: 'Registrati con Google' },\n sq: { signin: 'Identifikohu', continue_with: 'Vazhdo me Google', signin_with: 'Identifikohu me Google', signup_with: 'Regjistrohu me Google' },\n ro: { signin: 'Conecteaz\\u0103-te', continue_with: 'Continu\\u0103 cu Google', signin_with: 'Conecteaz\\u0103-te cu Google', signup_with: '\\u00censcrie-te cu Google' },\n de: { signin: 'Anmelden', continue_with: 'Weiter mit Google', signin_with: '\\u00dcber Google anmelden', signup_with: 'Mit Google anmelden' },\n ko: { signin: '\\ub85c\\uadf8\\uc778', continue_with: 'Google \\uacc4\\uc815\\uc73c\\ub85c \\uacc4\\uc18d\\ud558\\uae30', signin_with: 'Google \\uacc4\\uc815\\uc73c\\ub85c \\ub85c\\uadf8\\uc778', signup_with: 'Google \\uacc4\\uc815\\uc73c\\ub85c \\uac00\\uc785\\ud558\\uae30' },\n fr: { signin: 'Se connecter', continue_with: 'Continuer avec Google', signin_with: 'Se connecter avec Google', signup_with: \"S'inscrire avec Google\" },\n kmr: { signin: 'Oturum a\\u00e7\\u0131n', continue_with: 'Google ile devam edin', signin_with: 'Google ile oturum a\\u00e7\\u0131n', signup_with: 'Google ile kaydolun' },\n zh: { signin: '\\u767b\\u5f55', continue_with: '\\u901a\\u8fc7 Google \\u7ee7\\u7eed\\u64cd\\u4f5c', signin_with: \"\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u767b\\u5f55\", signup_with: '\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u6ce8\\u518c' },\n 'zh-CN': { signin: '\\u767b\\u5f55', continue_with: '\\u901a\\u8fc7 Google \\u7ee7\\u7eed\\u64cd\\u4f5c', signin_with: \"\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u767b\\u5f55\", signup_with: '\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u6ce8\\u518c' },\n 'zh-HK': { signin: '\\u767b\\u5165', continue_with: '\\u7e7c\\u7e8c\\u900f\\u904e Google \\u5e33\\u6236\\u64cd\\u4f5c', signin_with: '\\u4f7f\\u7528 Google \\u5e33\\u6236\\u767b\\u5165', signup_with: '\\u4f7f\\u7528 Google \\u5e33\\u6236\\u8a3b\\u518a' },\n pt: { signin: 'Fazer login', continue_with: 'Continuar com o Google', signin_with: 'Fazer login com o Google', signup_with: 'Inscrever-se no Google' },\n es: { signin: 'Iniciar sesi\\u00f3n', continue_with: 'Continuar con Google', signin_with: 'Iniciar sesi\\u00f3n con Google', signup_with: 'Registrarse con Google' },\n };\n const locale = gsiButtonConfiguration === null || gsiButtonConfiguration === void 0 ? void 0 : gsiButtonConfiguration.locale;\n let localeTexts = locale !== undefined && locale in localizedStrings ? (localizedStrings[locale]) : undefined;\n if (localeTexts === undefined) {\n const countryCode = (locale === null || locale === void 0 ? void 0 : locale.includes('-')) === true ? locale.split('-')[1] : (locale !== null && locale !== void 0 ? locale : '');\n localeTexts = countryCode in localizedStrings ? localizedStrings[countryCode] : localizedStrings['en'];\n }\n const text = (_a = gsiButtonConfiguration === null || gsiButtonConfiguration === void 0 ? void 0 : gsiButtonConfiguration.text) !== null && _a !== void 0 ? _a : 'signin_with';\n const buttonText = localeTexts[text];\n // HTML from https://github.com/inouiw/ReactSignInWithGoogleButton\n const button = document.createElement('button');\n button.setAttribute(\"style\", \"border-radius: 4px; background-color: rgb(255, 255, 255); border: 1px solid rgb(218, 220, 224); color: rgb(60, 64, 67); cursor: pointer; font-family: Roboto, Verdana; font-weight: 500; font-size: 14px; height: 40px; letter-spacing: 0.25px; padding: 0px 12px; position: relative; text-align: center; vertical-align: middle; width: auto;\");\n button.innerHTML = `\n <div style=\"display: flex; align-items: center; flex-flow: row nowrap; justify-content: space-between; height: 100%; position: relative; width: 100%;\">\n <div style=\"height: 18px; margin-right: 8px; min-width: 18px; width: 18px;\">\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"18px\" height=\"18px\" viewBox=\"0 0 48 48\">\n <g>\n <path fill=\"#EA4335\" d=\"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z\"></path>\n <path fill=\"#4285F4\" d=\"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z\"></path>\n <path fill=\"#FBBC05\" d=\"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z\"></path>\n <path fill=\"#34A853\" d=\"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z\"></path>\n <path fill=\"none\" d=\"M0 0h48v48H0z\"></path>\n </g>\n </svg>\n </div>\n <p>${buttonText}</p>\n </div>`;\n return button;\n }\n}\nconst googleOneTapAuth = new GoogleOneTapAuth();\nexport { googleOneTapAuth as GoogleOneTapAuth };\n//# sourceMappingURL=GoogleOneTapAuth.js.map"],"names":["WebPlugin","registerPlugin","Capacitor","jwtDecode"],"mappings":";;;IAAO,SAAS,MAAM,CAAC,SAAS,EAAE,aAAa,EAAE;IACjD,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE;IACtB,QAAQ,MAAM,UAAU,GAAG,mBAAmB,EAAE,CAAC;IACjD,QAAQ,IAAI,aAAa,IAAI,SAAS,EAAE;IACxC,YAAY,MAAM,KAAK,CAAC,aAAa,GAAG,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IACrE,SAAS;IACT,QAAQ,MAAM,KAAK,CAAC,CAAC,wBAAwB,EAAE,SAAS,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IACjG,KAAK;IACL,CAAC;IACM,SAAS,eAAe,CAAC,MAAM,EAAE;IACxC,IAAI,IAAI,kBAAkB,GAAG,IAAI,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9D,IAAI,kBAAkB,GAAG,MAAM,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;IACpE,IAAI,MAAM,kBAAkB,GAAG,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChG,IAAI,OAAO,kBAAkB,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC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AK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,sBAAsB,CAAC,IAAI,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,aAAa,CAAC;IACvL,QAAQ,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAC7C;IACA,QAAQ,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACxD,QAAQ,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,iVAAiV,CAAC,CAAC;IACxX,QAAQ,MAAM,CAAC,SAAS,GAAG,CAAC;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU,CAAC;AACxB,YAAY,CAAC,CAAC;IACd,QAAQ,OAAO,MAAM,CAAC;IACtB,KAAK;IACL,CAAC;AACI,UAAC,gBAAgB,GAAG,IAAI,gBAAgB;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/helpers.js","esm/web.js","esm/GoogleOneTapAuth.js"],"sourcesContent":["export function assert(predicate, customMessage) {\n if (!predicate()) {\n const callerName = callingFunctionName();\n if (customMessage != undefined) {\n throw Error(customMessage + `. Error in ${callerName}.`);\n }\n throw Error(`Assert error, expected '${predicate}' to be true. Error in ${callerName}.`);\n }\n}\nexport function randomHexString(length) {\n let uint8RandomNumbers = new Uint8Array((length / 2) + 1);\n uint8RandomNumbers = crypto.getRandomValues(uint8RandomNumbers);\n const numbersAsHexString = Array.from(uint8RandomNumbers).map(x => x.toString(16)).join('');\n return numbersAsHexString.substring(0, length);\n}\nfunction callingFunctionName() {\n var _a;\n try {\n return (_a = (new Error()).stack) === null || _a === void 0 ? void 0 : _a.split(\"\\n\")[3].trim().split(\" \")[1];\n }\n catch (_b) {\n // ignore.\n }\n}\nexport function loadScript(url) {\n return new Promise((resolve, reject) => {\n var scriptEl = document.createElement('script');\n scriptEl.async = true;\n scriptEl.onerror = () => reject();\n scriptEl.onload = () => resolve();\n scriptEl.src = url;\n document.getElementsByTagName('head')[0].appendChild(scriptEl);\n });\n}\n//# sourceMappingURL=helpers.js.map","import { WebPlugin } from '@capacitor/core';\nimport { assert, loadScript } from './helpers';\nvar FedCMSignInResult;\n(function (FedCMSignInResult) {\n FedCMSignInResult[FedCMSignInResult[\"SUCCESS\"] = 0] = \"SUCCESS\";\n FedCMSignInResult[FedCMSignInResult[\"CANCELLED\"] = 1] = \"CANCELLED\";\n FedCMSignInResult[FedCMSignInResult[\"OTHER_ERROR\"] = 2] = \"OTHER_ERROR\";\n})(FedCMSignInResult || (FedCMSignInResult = {}));\n// See https://developers.google.com/identity/gsi/web/guides/use-one-tap-js-api\nexport class GoogleOneTapAuthWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.gsiScriptUrl = 'https://accounts.google.com/gsi/client';\n this.gapiLoadedPromise = undefined;\n this.initializeOptions = undefined;\n this.isGapiLoadRequested = false;\n this.fedCMAbortController = undefined;\n this.cancelCalledAbortReason = 'CANCEL_CALLED';\n }\n async initialize(options) {\n this.initializeOptions = options;\n if (!this.gapiLoadedPromise) {\n this.gapiLoadedPromise = loadScript(this.gsiScriptUrl);\n this.isGapiLoadRequested = true;\n }\n return this.gapiLoadedPromise;\n }\n async tryAutoOrOneTapSignIn() {\n let signInResult = await this.doSignIn(true);\n if (!signInResult.idToken\n // If the popup was cancelled, do not show it again.\n && signInResult.noSuccessReasonCode !== 'SIGN_IN_CANCELLED') {\n signInResult = await this.doSignIn(false);\n }\n if (signInResult.idToken) {\n return {\n isSuccess: true,\n success: signInResult\n };\n }\n else {\n return {\n isSuccess: false,\n noSuccess: signInResult\n };\n }\n }\n async tryOneTapSignIn() {\n let signInResult = await this.doSignIn(false);\n if (signInResult.idToken) {\n return {\n isSuccess: true,\n success: signInResult\n };\n }\n else {\n return {\n isSuccess: false,\n noSuccess: signInResult\n };\n }\n }\n async tryAutoSignIn() {\n let signInResult = await this.doSignIn(true);\n if (signInResult.idToken) {\n return {\n isSuccess: true,\n success: signInResult\n };\n }\n else {\n return {\n isSuccess: false,\n noSuccess: signInResult\n };\n }\n }\n async renderSignInButton(parentElementId, options, gsiButtonConfiguration) {\n const parentElem = document.getElementById(parentElementId);\n assert(() => !!parentElem);\n var signInPromise = new Promise((resolve) => {\n this.oneTapInitialize(false, resolve, options.webOptions);\n // // Adding a click_listener allows to detect when the popup is opened.\n // (gsiButtonConfiguration as any).click_listener = () => {\n // console.log('click_listener');\n // };\n google.accounts.id.renderButton(parentElem, gsiButtonConfiguration);\n });\n return signInPromise;\n }\n async fedCMSignIn(autoSelect, resolveSignInFunc) {\n var _a, _b;\n try {\n // console.log(`IdentityCredential supported: ${'IdentityCredential' in window}`);\n if ('IdentityCredential' in window === false) {\n return FedCMSignInResult.OTHER_ERROR;\n }\n this.fedCMAbortController = new AbortController();\n // see https://developers.google.com/privacy-sandbox/3pcd/fedcm\n // see https://developers.google.com/privacy-sandbox/blog/fedcm-auto-reauthn\n const identityCredential = await navigator.credentials.get({\n identity: {\n context: 'signin',\n providers: [\n {\n configURL: 'https://accounts.google.com/gsi/fedcm.json',\n clientId: this.initializeOptions.clientId,\n // loginHint: ''\n nonce: this.initializeOptions.nonce\n }\n ]\n },\n mediation: autoSelect ? 'optional' : 'required',\n signal: this.fedCMAbortController.signal\n });\n // console.log('fedCMSignIn result: ', identityCredential);\n if (!(identityCredential === null || identityCredential === void 0 ? void 0 : identityCredential.token)) {\n return FedCMSignInResult.OTHER_ERROR;\n }\n resolveSignInFunc({\n idToken: identityCredential.token,\n isAutoSelect: identityCredential.isAutoSelect\n });\n return FedCMSignInResult.SUCCESS;\n }\n catch (e) {\n // NotSupportedError DOMException\n // IdentityCredentialError DOMException\n // NetworkError DOMException --> name: 'NetworkError'\n // NotAllowedError DOMException\n const name = (_a = e.name) !== null && _a !== void 0 ? _a : '';\n const message = (_b = e.message) !== null && _b !== void 0 ? _b : '';\n // console.log('fedCMSignIn error: ', e, name);\n if (message.includes(this.cancelCalledAbortReason)\n || (name === 'NetworkError' && message.includes('Error retrieving a token.'))) {\n return FedCMSignInResult.CANCELLED;\n }\n return FedCMSignInResult.OTHER_ERROR;\n }\n finally {\n this.fedCMAbortController = undefined;\n }\n }\n fedCMSignOut() {\n navigator.credentials.preventSilentAccess();\n }\n fedCMAbort() {\n var _a;\n (_a = this.fedCMAbortController) === null || _a === void 0 ? void 0 : _a.abort({ message: this.cancelCalledAbortReason });\n }\n async doSignIn(autoSelect) {\n var signInPromise = new Promise(async (resolve, _reject) => {\n let fedCMResult = await this.fedCMSignIn(autoSelect, resolve);\n if (fedCMResult === FedCMSignInResult.CANCELLED) {\n resolve({ noSuccessReasonCode: 'SIGN_IN_CANCELLED' });\n }\n else if (fedCMResult === FedCMSignInResult.OTHER_ERROR) {\n this.oneTapInitialize(autoSelect, resolve); // The resolve function is passed, so it can be called in handleCredentialResponse.\n google.accounts.id.prompt();\n }\n });\n return signInPromise;\n }\n oneTapInitialize(autoSelect, resolveSignInFunc, buttonWebOptions) {\n var _a;\n google.accounts.id.initialize({\n client_id: this.initializeOptions.clientId,\n callback: (credentialResponse) => this.handleCredentialResponse(credentialResponse, resolveSignInFunc),\n auto_select: autoSelect,\n itp_support: (buttonWebOptions === null || buttonWebOptions === void 0 ? void 0 : buttonWebOptions.itpSupport) || false,\n cancel_on_tap_outside: ((_a = this.initializeOptions.webOptions) === null || _a === void 0 ? void 0 : _a.cancelOnTapOutside) || true,\n ux_mode: (buttonWebOptions === null || buttonWebOptions === void 0 ? void 0 : buttonWebOptions.uxMode) || 'popup',\n nonce: this.initializeOptions.nonce,\n use_fedcm_for_prompt: true,\n use_fedcm_for_button: true\n // log_level: 'debug'\n });\n }\n handleCredentialResponse(credentialResponse, resolveSignInFunc) {\n let signInResult = {\n idToken: credentialResponse.credential,\n isAutoSelect: credentialResponse.isAutoSelect,\n };\n resolveSignInFunc(signInResult);\n }\n cancelOneTapDialog() {\n google.accounts.id.cancel();\n this.fedCMAbort();\n }\n signOut(authenticatedUserId) {\n if (this.isGapiLoadRequested === false) {\n this.fedCMSignOut();\n return Promise.resolve({ isSuccess: true });\n }\n return new Promise((resolve) => {\n if (authenticatedUserId) {\n // Calling revoke method revokes all OAuth2 scopes previously granted by the Sign In With Google client library.\n google.accounts.id.revoke(authenticatedUserId, response => {\n if (response.successful) {\n resolve({ isSuccess: true });\n }\n else {\n resolve({ isSuccess: false, error: response.error });\n }\n });\n }\n else {\n resolve({ isSuccess: true });\n }\n });\n }\n}\n//# sourceMappingURL=web.js.map","import { Capacitor, registerPlugin } from '@capacitor/core';\nimport { assert, randomHexString } from './helpers';\nimport { GoogleOneTapAuthWeb } from './web';\nimport { jwtDecode } from \"jwt-decode\";\nconst GoogleOneTapAuthPlatform = registerPlugin('GoogleOneTapAuth', {\n web: () => new GoogleOneTapAuthWeb(),\n});\nvar InitializeStatus;\n(function (InitializeStatus) {\n InitializeStatus[InitializeStatus[\"NotInitialized\"] = 0] = \"NotInitialized\";\n InitializeStatus[InitializeStatus[\"Initializing\"] = 1] = \"Initializing\";\n InitializeStatus[InitializeStatus[\"Initialized\"] = 2] = \"Initialized\";\n})(InitializeStatus || (InitializeStatus = {}));\n// This file is the entry point for all plugin methods. It contains common logic to web, android, iOS or delegates to the specific implementation.\nclass GoogleOneTapAuth {\n constructor() {\n this.initializeStatus = InitializeStatus.NotInitialized;\n this.authenticatedUserId = undefined;\n this.isInitializedPromise = new Promise((resolve) => {\n this.resolveIsInitializedPromise = resolve;\n });\n }\n /// Performs common or one-time initialization. Can be called multiple times.\n initialize(options) {\n if (this.initializeStatus === InitializeStatus.NotInitialized) {\n this.initializeStatus = InitializeStatus.Initializing;\n if (!options.clientId || options.clientId.endsWith(\"apps.googleusercontent.com\") == false) {\n throw new Error(\"clientId must end with 'apps.googleusercontent.com' but is: \" + options.clientId);\n }\n this.nonce = options.nonce = options.nonce || randomHexString(10);\n GoogleOneTapAuthPlatform.initialize(options).then(() => {\n this.initializeStatus = InitializeStatus.Initialized;\n this.resolveIsInitializedPromise();\n });\n }\n return this.isInitializedPromise;\n }\n async ensureInitialized() {\n assert(() => this.initializeStatus !== InitializeStatus.NotInitialized, 'Must call initialize first.');\n if (this.initializeStatus === InitializeStatus.Initializing) {\n await this.isInitializedPromise;\n }\n }\n async tryAutoOrOneTapSignIn() {\n await this.ensureInitialized();\n const notEnrichtedSignInResultOption = await GoogleOneTapAuthPlatform.tryAutoOrOneTapSignIn();\n const enrichtedSignInResultOption = this.enrichOptionResultWithDecodedIdToken(notEnrichtedSignInResultOption);\n this.onResultReceived(enrichtedSignInResultOption);\n return enrichtedSignInResultOption;\n }\n async tryOneTapSignIn() {\n await this.ensureInitialized();\n const notEnrichtedSignInResultOption = await GoogleOneTapAuthPlatform.tryOneTapSignIn();\n const enrichtedSignInResultOption = this.enrichOptionResultWithDecodedIdToken(notEnrichtedSignInResultOption);\n this.onResultReceived(enrichtedSignInResultOption);\n return enrichtedSignInResultOption;\n }\n async tryAutoSignIn() {\n await this.ensureInitialized();\n const notEnrichtedSignInResultOption = await GoogleOneTapAuthPlatform.tryAutoSignIn();\n const enrichtedSignInResultOption = this.enrichOptionResultWithDecodedIdToken(notEnrichtedSignInResultOption);\n this.onResultReceived(enrichtedSignInResultOption);\n return enrichtedSignInResultOption;\n }\n onResultReceived(signInResultOption) {\n if (signInResultOption.isSuccess) {\n this.authenticatedUserId = signInResultOption.success.userId;\n }\n }\n cancelOneTapDialog() {\n GoogleOneTapAuthPlatform.cancelOneTapDialog();\n }\n async signOut() {\n const result = await GoogleOneTapAuthPlatform.signOut(this.authenticatedUserId);\n this.authenticatedUserId = undefined;\n return result;\n }\n async addSignInActionToExistingButton(buttonParentId, buttonId) {\n await this.ensureInitialized();\n const buttonParentElem = document.getElementById(buttonParentId);\n const buttonElem = document.getElementById(buttonId);\n assert(() => !!buttonParentElem);\n assert(() => !!buttonElem);\n if (Capacitor.getPlatform() === 'web') {\n buttonParentElem.style.position = 'relative';\n buttonParentElem.style.overflow = 'hidden';\n // buttonParentElem!.style.border = '2px solid red'; // uncomment for debugging\n // The visible button width should be the same as the google button width.\n const buttonElemWidth = await this.waitForElementOffsetWidthNotZero(buttonElem);\n assert(() => buttonElemWidth !== 0);\n const invisibleGoogleButtonDiv = document.createElement('div');\n const invisibleGoogleButtonDivId = 'invisibleGoogleButtonDiv';\n invisibleGoogleButtonDiv.setAttribute('id', invisibleGoogleButtonDivId);\n invisibleGoogleButtonDiv.style.position = 'absolute';\n invisibleGoogleButtonDiv.style.top = '0px';\n invisibleGoogleButtonDiv.style.left = '0px';\n invisibleGoogleButtonDiv.style.width = `${buttonElemWidth}px`;\n invisibleGoogleButtonDiv.style.boxSizing = 'border-box';\n invisibleGoogleButtonDiv.style.opacity = '0.0001'; // change it for debugging\n buttonElem.appendChild(invisibleGoogleButtonDiv);\n return await this._doRenderSignInButton(invisibleGoogleButtonDivId, {}, { width: buttonElemWidth }, buttonElem);\n }\n else {\n return await this._doRenderSignInButton(buttonParentId, {}, {}, buttonElem);\n }\n }\n waitForElementOffsetWidthNotZero(element) {\n if (element.offsetWidth !== 0) {\n return Promise.resolve(element.offsetWidth);\n }\n return new Promise((resolve) => {\n const resizeObserver = new ResizeObserver(() => {\n if (element.offsetWidth !== 0) {\n resolve(element.offsetWidth);\n }\n });\n resizeObserver.observe(element);\n });\n }\n async renderSignInButton(parentElementId, options, gsiButtonConfiguration) {\n const androidAndIosButtonElem = this.getSignInButtonHtml(gsiButtonConfiguration);\n return this._doRenderSignInButton(parentElementId, options, gsiButtonConfiguration, androidAndIosButtonElem);\n }\n async _doRenderSignInButton(parentElementId, options, gsiButtonConfiguration, androidAndIosButtonElem) {\n await this.ensureInitialized();\n const parentElem = document.getElementById(parentElementId);\n assert(() => !!parentElem);\n options.webOptions = options.webOptions || {};\n return new Promise(async (resolve, reject) => {\n try {\n if (Capacitor.getPlatform() === 'web') {\n const notEnrichedSuccessSignInResult = await GoogleOneTapAuthPlatform.renderSignInButton(parentElementId, options, gsiButtonConfiguration);\n const enrichtedSuccessSignInResult = this.enrichSuccessResultWithDecodedIdToken(notEnrichedSuccessSignInResult);\n this.authenticatedUserId = enrichtedSuccessSignInResult.userId;\n resolve(enrichtedSuccessSignInResult);\n return;\n }\n const onClickAction = async () => {\n var _a;\n try {\n const notEnrichedSuccessSignInResult = await GoogleOneTapAuthPlatform.triggerGoogleSignIn(options);\n if (notEnrichedSuccessSignInResult.isSuccess) {\n const enrichtedSuccessSignInResult = this.enrichSuccessResultWithDecodedIdToken(notEnrichedSuccessSignInResult.success);\n this.authenticatedUserId = enrichtedSuccessSignInResult.userId;\n resolve(enrichtedSuccessSignInResult);\n }\n else {\n if (((_a = notEnrichedSuccessSignInResult.noSuccess) === null || _a === void 0 ? void 0 : _a.noSuccessReasonCode) === 'SIGN_IN_CANCELLED') {\n // console.log('User cancelled sign in. Waiting for next sign in attempt.');\n }\n }\n }\n catch (e) {\n reject(e);\n }\n };\n androidAndIosButtonElem.onclick = onClickAction;\n parentElem.appendChild(androidAndIosButtonElem);\n }\n catch (e) {\n reject(e);\n }\n });\n }\n getNonce() {\n assert(() => !!this.nonce, `The nonce is only set after ${() => this.initialize} was called.`);\n return this.nonce;\n }\n enrichOptionResultWithDecodedIdToken(signInResultOption) {\n if (signInResultOption.isSuccess === false) {\n return signInResultOption;\n }\n return Object.assign(Object.assign({}, signInResultOption), { success: this.enrichSuccessResultWithDecodedIdToken(signInResultOption.success) });\n }\n enrichSuccessResultWithDecodedIdToken(successSignInResult) {\n const decodedJwt = jwtDecode(successSignInResult.idToken);\n return Object.assign(Object.assign({}, successSignInResult), { decodedIdToken: decodedJwt, userId: decodedJwt.sub, email: decodedJwt.email });\n }\n getSignInButtonHtml(gsiButtonConfiguration) {\n var _a;\n // Note: Replacing double quotes with single quotes will break some strings.\n const localizedStrings = {\n en: { signin: 'Sign in', continue_with: 'Continue with Google', signin_with: 'Sign in with Google', signup_with: 'Sign up with Google' },\n ar: { signin: '\\u062a\\u0633\\u062c\\u064a\\u0644 \\u0627\\u0644\\u062f\\u062e\\u0648\\u0644', continue_with: '\\u0627\\u0644\\u0645\\u0648\\u0627\\u0635\\u0644\\u0629 \\u0628\\u0627\\u0633\\u062a\\u062e\\u062f\\u0627\\u0645 Google', signin_with: '\\u062a\\u0633\\u062c\\u064a\\u0644 \\u0627\\u0644\\u062f\\u062e\\u0648\\u0644 \\u0628\\u0627\\u0633\\u062a\\u062e\\u062f\\u0627\\u0645 Google', signup_with: '\\u0627\\u0644\\u0627\\u0634\\u062a\\u0631\\u0627\\u0643 \\u0645\\u0646 \\u062e\\u0644\\u0627\\u0644 Google' },\n sr: { signin: '\\u041f\\u0440\\u0438\\u0458\\u0430\\u0432\\u0438 \\u043c\\u0435', continue_with: '\\u041d\\u0430\\u0441\\u0442\\u0430\\u0432\\u0438\\u0442\\u0435 \\u0441\\u0430 Google-\\u043e\\u043c', signin_with: '\\u041f\\u0440\\u0438\\u0458\\u0430\\u0432\\u0438\\u0442\\u0435 \\u0441\\u0435 \\u043f\\u043e\\u043c\\u043e\\u045b\\u0443 Google-\\u0430', signup_with: '\\u0420\\u0435\\u0433\\u0438\\u0441\\u0442\\u0440\\u0443\\u0458\\u0442\\u0435 \\u0441\\u0435 \\u043f\\u043e\\u043c\\u043e\\u045b\\u0443 Google-\\u0430' },\n nb: { signin: 'Logg p\\u00e5', continue_with: 'Fortsett med Google', signin_with: 'Logg p\\u00e5 med Google', signup_with: 'Registrer deg med Google' },\n pl: { signin: 'Zaloguj si\\u0119', continue_with: 'Kontynuuj przy u\\u017cyciu konta Google', signin_with: 'Zaloguj si\\u0119 przez Google', signup_with: 'Zarejestruj si\\u0119 przez Google' },\n vi: { signin: '\\u0110\\u0103ng nh\\u1eadp', continue_with: 'Ti\\u1ebfp t\\u1ee5c truy c\\u1eadp Google', signin_with: '\\u0110\\u0103ng nh\\u00e2\\u0323p b\\u0103\\u0300ng Google', signup_with: '\\u0110\\u0103ng k\\u00fd b\\u1eb1ng Google' },\n cs: { signin: 'P\\u0159ihl\\u00e1sit se', continue_with: 'Pokra\\u010dovat pomoc\\u00ed Googlu', signin_with: \"P\\u0159ihl\\u00e1sit se p\\u0159es Google\", signup_with: 'Registrace pomoc\\u00ed Googlu' },\n id: { signin: 'Login', continue_with: 'Lanjutkan dengan Google', signin_with: 'Login dengan Google', signup_with: 'Daftar dengan Google' },\n nl: { signin: 'Inloggen', continue_with: 'Doorgaan met Google', signin_with: 'Inloggen met Google', signup_with: 'Aanmelden bij Google' },\n gl: { signin: 'Iniciar sesi\\u00f3n', continue_with: 'Continuar con Google', signin_with: 'Iniciar sesi\\u00f3n con Google', signup_with: 'Iniciar sesi\\u00f3n con Google' },\n sv: { signin: 'Logga in', continue_with: 'Forts\\u00e4tt med Google', signin_with: 'Logga in med Google', signup_with: 'Registrera dig med Google' },\n lv: { signin: 'Pierakst\\u012b\\u0161an\\u0101s', continue_with: 'Turpin\\u0101t darbu ar Google', signin_with: 'Pierakstieties ar Google', signup_with: 'Re\\u0123istr\\u0113\\u0161an\\u0101s, izmantojot Google' },\n tr: { signin: 'Oturum a\\u00e7\\u0131n', continue_with: 'Google ile devam edin', signin_with: 'Google ile oturum a\\u00e7\\u0131n', signup_with: 'Google ile kaydolun' },\n it: { signin: 'Accedi', continue_with: 'Continua con Google', signin_with: 'Accedi con Google', signup_with: 'Registrati con Google' },\n sq: { signin: 'Identifikohu', continue_with: 'Vazhdo me Google', signin_with: 'Identifikohu me Google', signup_with: 'Regjistrohu me Google' },\n ro: { signin: 'Conecteaz\\u0103-te', continue_with: 'Continu\\u0103 cu Google', signin_with: 'Conecteaz\\u0103-te cu Google', signup_with: '\\u00censcrie-te cu Google' },\n de: { signin: 'Anmelden', continue_with: 'Weiter mit Google', signin_with: '\\u00dcber Google anmelden', signup_with: 'Mit Google anmelden' },\n ko: { signin: '\\ub85c\\uadf8\\uc778', continue_with: 'Google \\uacc4\\uc815\\uc73c\\ub85c \\uacc4\\uc18d\\ud558\\uae30', signin_with: 'Google \\uacc4\\uc815\\uc73c\\ub85c \\ub85c\\uadf8\\uc778', signup_with: 'Google \\uacc4\\uc815\\uc73c\\ub85c \\uac00\\uc785\\ud558\\uae30' },\n fr: { signin: 'Se connecter', continue_with: 'Continuer avec Google', signin_with: 'Se connecter avec Google', signup_with: \"S'inscrire avec Google\" },\n kmr: { signin: 'Oturum a\\u00e7\\u0131n', continue_with: 'Google ile devam edin', signin_with: 'Google ile oturum a\\u00e7\\u0131n', signup_with: 'Google ile kaydolun' },\n zh: { signin: '\\u767b\\u5f55', continue_with: '\\u901a\\u8fc7 Google \\u7ee7\\u7eed\\u64cd\\u4f5c', signin_with: \"\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u767b\\u5f55\", signup_with: '\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u6ce8\\u518c' },\n 'zh-CN': { signin: '\\u767b\\u5f55', continue_with: '\\u901a\\u8fc7 Google \\u7ee7\\u7eed\\u64cd\\u4f5c', signin_with: \"\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u767b\\u5f55\", signup_with: '\\u4f7f\\u7528 Google \\u5e10\\u53f7\\u6ce8\\u518c' },\n 'zh-HK': { signin: '\\u767b\\u5165', continue_with: '\\u7e7c\\u7e8c\\u900f\\u904e Google \\u5e33\\u6236\\u64cd\\u4f5c', signin_with: '\\u4f7f\\u7528 Google \\u5e33\\u6236\\u767b\\u5165', signup_with: '\\u4f7f\\u7528 Google \\u5e33\\u6236\\u8a3b\\u518a' },\n pt: { signin: 'Fazer login', continue_with: 'Continuar com o Google', signin_with: 'Fazer login com o Google', signup_with: 'Inscrever-se no Google' },\n es: { signin: 'Iniciar sesi\\u00f3n', continue_with: 'Continuar con Google', signin_with: 'Iniciar sesi\\u00f3n con Google', signup_with: 'Registrarse con Google' },\n };\n const locale = gsiButtonConfiguration === null || gsiButtonConfiguration === void 0 ? void 0 : gsiButtonConfiguration.locale;\n let localeTexts = locale !== undefined && locale in localizedStrings ? (localizedStrings[locale]) : undefined;\n if (localeTexts === undefined) {\n const countryCode = (locale === null || locale === void 0 ? void 0 : locale.includes('-')) === true ? locale.split('-')[1] : (locale !== null && locale !== void 0 ? locale : '');\n localeTexts = countryCode in localizedStrings ? localizedStrings[countryCode] : localizedStrings['en'];\n }\n const text = (_a = gsiButtonConfiguration === null || gsiButtonConfiguration === void 0 ? void 0 : gsiButtonConfiguration.text) !== null && _a !== void 0 ? _a : 'signin_with';\n const buttonText = localeTexts[text];\n // HTML from https://github.com/inouiw/ReactSignInWithGoogleButton\n const button = document.createElement('button');\n button.setAttribute(\"style\", \"border-radius: 4px; background-color: rgb(255, 255, 255); border: 1px solid rgb(218, 220, 224); color: rgb(60, 64, 67); cursor: pointer; font-family: Roboto, Verdana; font-weight: 500; font-size: 14px; height: 40px; letter-spacing: 0.25px; padding: 0px 12px; position: relative; text-align: center; vertical-align: middle; width: auto;\");\n button.innerHTML = `\n <div style=\"display: flex; align-items: center; flex-flow: row nowrap; justify-content: space-between; height: 100%; position: relative; width: 100%;\">\n <div style=\"height: 18px; margin-right: 8px; min-width: 18px; width: 18px;\">\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"18px\" height=\"18px\" viewBox=\"0 0 48 48\">\n <g>\n <path fill=\"#EA4335\" d=\"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z\"></path>\n <path fill=\"#4285F4\" d=\"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z\"></path>\n <path fill=\"#FBBC05\" d=\"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z\"></path>\n <path fill=\"#34A853\" d=\"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z\"></path>\n <path fill=\"none\" d=\"M0 0h48v48H0z\"></path>\n </g>\n </svg>\n </div>\n <p>${buttonText}</p>\n </div>`;\n return button;\n }\n}\nconst googleOneTapAuth = new GoogleOneTapAuth();\nexport { googleOneTapAuth as GoogleOneTapAuth };\n//# sourceMappingURL=GoogleOneTapAuth.js.map"],"names":["WebPlugin","registerPlugin","Capacitor","jwtDecode"],"mappings":";;;IAAO,SAAS,MAAM,CAAC,SAAS,EAAE,aAAa,EAAE;IACjD,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE;IACtB,QAAQ,MAAM,UAAU,GAAG,mBAAmB,EAAE,CAAC;IACjD,QAAQ,IAAI,aAAa,IAAI,SAAS,EAAE;IACxC,YAAY,MAAM,KAAK,CAAC,aAAa,GAAG,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IACrE,SAAS;IACT,QAAQ,MAAM,KAAK,CAAC,CAAC,wBAAwB,EAAE,SAAS,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IACjG,KAAK;IACL,CAAC;IACM,SAAS,eAAe,CAAC,MAAM,EAAE;IACxC,IAAI,IAAI,kBAAkB,GAAG,IAAI,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9D,IAAI,kBAAkB,GAAG,MAAM,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;IACpE,IAAI,MAAM,kBAAkB,GAAG,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChG,IAAI,OAAO,kBAAkB,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,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