@atlasauth/js 0.1.6 → 0.1.8
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/dist/native.d.ts +77 -2
- package/dist/native.js +223 -9
- package/dist/native.js.map +1 -1
- package/package.json +1 -1
package/dist/native.d.ts
CHANGED
|
@@ -89,6 +89,7 @@ interface GsiHost {
|
|
|
89
89
|
};
|
|
90
90
|
document: Document;
|
|
91
91
|
ResizeObserver?: typeof ResizeObserver;
|
|
92
|
+
MutationObserver?: typeof MutationObserver;
|
|
92
93
|
}
|
|
93
94
|
/** Inject the GSI script once; resolves when it is ready. */
|
|
94
95
|
export declare function loadGoogleIdentityServices(doc: Document): Promise<void>;
|
|
@@ -136,11 +137,24 @@ export declare function renderGoogleButton(opts: {
|
|
|
136
137
|
*
|
|
137
138
|
* The failure mode people hit is misalignment — the invisible button not covering
|
|
138
139
|
* the visible one, so clicks miss. This guards against it: the overlay fills the
|
|
139
|
-
* wrapper,
|
|
140
|
-
*
|
|
140
|
+
* wrapper, GSI's rendered button is STRETCHED (inline) to fill the overlay rather
|
|
141
|
+
* than centred-and-clipped, and a ResizeObserver re-renders on layout changes so
|
|
142
|
+
* the whole surface stays clickable. In development it also self-verifies the
|
|
143
|
+
* coverage and warns (loudly, never throwing) when the geometry is off.
|
|
141
144
|
*
|
|
142
145
|
* `wrapper` is YOUR styled button (or its container); it is made position:relative
|
|
143
146
|
* if it is not already positioned. Returns `{ destroy }` to tear the overlay down.
|
|
147
|
+
*
|
|
148
|
+
* `visible` (default false) picks WHAT the user sees (customer spec 4.5):
|
|
149
|
+
* - false — today's behaviour: Google's button is drawn at opacity 0 as an
|
|
150
|
+
* invisible click-target overlaid on YOUR styled button. The user sees your
|
|
151
|
+
* button; the click lands on Google's. The overlay is `aria-hidden`.
|
|
152
|
+
* - true — Google's OWN button is drawn VISIBLY (opacity 1), on top of the
|
|
153
|
+
* wrapper, and IS the button the user operates (for teams who'd rather not
|
|
154
|
+
* maintain a styled button). It is NOT aria-hidden, since it is the real
|
|
155
|
+
* control. The host button underneath is then unnecessary.
|
|
156
|
+
* Either way the stretch-to-fill + ResizeObserver run, so Google's button tracks
|
|
157
|
+
* the wrapper's width.
|
|
144
158
|
*/
|
|
145
159
|
export declare function renderGoogleOverlayButton(opts: {
|
|
146
160
|
wrapper: HTMLElement;
|
|
@@ -151,8 +165,69 @@ export declare function renderGoogleOverlayButton(opts: {
|
|
|
151
165
|
size?: 'large' | 'medium' | 'small';
|
|
152
166
|
/** Also show the One-Tap prompt (OFF by default; the overlay button always shows). */
|
|
153
167
|
oneTap?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Render Google's button VISIBLY (opacity 1) instead of as a transparent overlay
|
|
170
|
+
* (default false = the invisible-overlay technique). See the function doc.
|
|
171
|
+
*/
|
|
172
|
+
visible?: boolean;
|
|
154
173
|
host?: GsiHost;
|
|
155
174
|
}): Promise<{
|
|
156
175
|
destroy: () => void;
|
|
157
176
|
}>;
|
|
177
|
+
/** A measured bounding box, plain numbers so the diagnosis serialises cleanly. */
|
|
178
|
+
export interface Rect {
|
|
179
|
+
width: number;
|
|
180
|
+
height: number;
|
|
181
|
+
top: number;
|
|
182
|
+
left: number;
|
|
183
|
+
right: number;
|
|
184
|
+
bottom: number;
|
|
185
|
+
}
|
|
186
|
+
/** The overlay-vs-wrapper geometry for a currently mounted overlay button. */
|
|
187
|
+
export interface OverlayGeometry {
|
|
188
|
+
/** Does the transparent overlay cover the host button on every edge? */
|
|
189
|
+
covers: boolean;
|
|
190
|
+
wrapper: Rect;
|
|
191
|
+
overlay: Rect;
|
|
192
|
+
/** The GSI iframe's size, or null if no iframe is present yet. */
|
|
193
|
+
iframe: {
|
|
194
|
+
width: number;
|
|
195
|
+
height: number;
|
|
196
|
+
} | null;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* The knowable facts about a provider's native-sign-in setup, as the SDK can see
|
|
200
|
+
* them. Deliberately honest about its limits: it reports the CURRENT page origin,
|
|
201
|
+
* NOT the provider's registered JavaScript origins — the SDK cannot read Google's
|
|
202
|
+
* client config, so the caller must compare `origin` against what they registered.
|
|
203
|
+
*/
|
|
204
|
+
export interface ProviderDiagnosis {
|
|
205
|
+
provider: string;
|
|
206
|
+
/** Resolved render mode from `/v1/client/environment` (`native` when unset but native), else null if the provider isn't listed. */
|
|
207
|
+
mode: 'native' | 'redirect' | null;
|
|
208
|
+
/** The public client_id from the environment, or null. */
|
|
209
|
+
clientId: string | null;
|
|
210
|
+
/** Whether the environment marks this provider native. */
|
|
211
|
+
native: boolean;
|
|
212
|
+
/** This page's origin — compare it to YOUR registered JS origins; the SDK can't. */
|
|
213
|
+
origin: string | null;
|
|
214
|
+
/** Overlay geometry if a button for this provider is currently mounted, else null. */
|
|
215
|
+
overlay: OverlayGeometry | null;
|
|
216
|
+
/** Has a Google credential been minted in this session? (Only tracked for google.) */
|
|
217
|
+
credentialMintedThisSession: boolean;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Collect the knowable facts about a native provider's setup for a support ticket
|
|
221
|
+
* or a dev console: its resolved `mode` and `client_id` (from
|
|
222
|
+
* `/v1/client/environment`), whether it's native, the current page origin, the
|
|
223
|
+
* live overlay geometry IF a button is mounted, and whether a Google credential has
|
|
224
|
+
* been minted this session. Hook-free, SSR-safe, and never throws — a failed
|
|
225
|
+
* environment fetch simply leaves the server-sourced fields null.
|
|
226
|
+
*
|
|
227
|
+
* It does NOT (and cannot) report the provider's registered JavaScript origins: the
|
|
228
|
+
* caller compares the returned `origin` against what they registered with Google.
|
|
229
|
+
*/
|
|
230
|
+
export declare function diagnoseProvider(client: FapiClient, provider: string): Promise<ProviderDiagnosis>;
|
|
231
|
+
/** Reset the session credential flag (tests). */
|
|
232
|
+
export declare function resetGoogleCredentialFlag(): void;
|
|
158
233
|
export {};
|
package/dist/native.js
CHANGED
|
@@ -19,6 +19,8 @@ exports.resetGoogleIdentityServices = resetGoogleIdentityServices;
|
|
|
19
19
|
exports.requestGoogleCredential = requestGoogleCredential;
|
|
20
20
|
exports.renderGoogleButton = renderGoogleButton;
|
|
21
21
|
exports.renderGoogleOverlayButton = renderGoogleOverlayButton;
|
|
22
|
+
exports.diagnoseProvider = diagnoseProvider;
|
|
23
|
+
exports.resetGoogleCredentialFlag = resetGoogleCredentialFlag;
|
|
22
24
|
const fapi_1 = require("./fapi");
|
|
23
25
|
/** Build the POST body for `/v1/client/sign_ins/id_token`. */
|
|
24
26
|
function nativeSignInBody(input) {
|
|
@@ -124,6 +126,18 @@ function reportProviderUnavailable(client, provider, reason) {
|
|
|
124
126
|
/* ---- Google Identity Services (One-Tap / GSI) ---------------------------- */
|
|
125
127
|
const GSI_SRC = 'https://accounts.google.com/gsi/client';
|
|
126
128
|
let gsiLoad = null;
|
|
129
|
+
function isDevEnv() {
|
|
130
|
+
return typeof process !== 'undefined' && process?.env?.NODE_ENV !== 'production';
|
|
131
|
+
}
|
|
132
|
+
const mountedOverlays = new Set();
|
|
133
|
+
/**
|
|
134
|
+
* Session flag: has a Google credential (id_token) actually been minted in this
|
|
135
|
+
* document since the module loaded? Set in the GSI credential callback. Exposed
|
|
136
|
+
* (read-only) through {@link diagnoseProvider} so a caller can tell "the button is
|
|
137
|
+
* mounted and looks healthy but no click has ever produced a credential" apart from
|
|
138
|
+
* "it has worked at least once".
|
|
139
|
+
*/
|
|
140
|
+
let googleCredentialMintedThisSession = false;
|
|
127
141
|
/** Inject the GSI script once; resolves when it is ready. */
|
|
128
142
|
function loadGoogleIdentityServices(doc) {
|
|
129
143
|
if (gsiLoad)
|
|
@@ -212,11 +226,24 @@ async function renderGoogleButton(opts) {
|
|
|
212
226
|
*
|
|
213
227
|
* The failure mode people hit is misalignment — the invisible button not covering
|
|
214
228
|
* the visible one, so clicks miss. This guards against it: the overlay fills the
|
|
215
|
-
* wrapper,
|
|
216
|
-
*
|
|
229
|
+
* wrapper, GSI's rendered button is STRETCHED (inline) to fill the overlay rather
|
|
230
|
+
* than centred-and-clipped, and a ResizeObserver re-renders on layout changes so
|
|
231
|
+
* the whole surface stays clickable. In development it also self-verifies the
|
|
232
|
+
* coverage and warns (loudly, never throwing) when the geometry is off.
|
|
217
233
|
*
|
|
218
234
|
* `wrapper` is YOUR styled button (or its container); it is made position:relative
|
|
219
235
|
* if it is not already positioned. Returns `{ destroy }` to tear the overlay down.
|
|
236
|
+
*
|
|
237
|
+
* `visible` (default false) picks WHAT the user sees (customer spec 4.5):
|
|
238
|
+
* - false — today's behaviour: Google's button is drawn at opacity 0 as an
|
|
239
|
+
* invisible click-target overlaid on YOUR styled button. The user sees your
|
|
240
|
+
* button; the click lands on Google's. The overlay is `aria-hidden`.
|
|
241
|
+
* - true — Google's OWN button is drawn VISIBLY (opacity 1), on top of the
|
|
242
|
+
* wrapper, and IS the button the user operates (for teams who'd rather not
|
|
243
|
+
* maintain a styled button). It is NOT aria-hidden, since it is the real
|
|
244
|
+
* control. The host button underneath is then unnecessary.
|
|
245
|
+
* Either way the stretch-to-fill + ResizeObserver run, so Google's button tracks
|
|
246
|
+
* the wrapper's width.
|
|
220
247
|
*/
|
|
221
248
|
async function renderGoogleOverlayButton(opts) {
|
|
222
249
|
const host = opts.host ?? window;
|
|
@@ -229,8 +256,12 @@ async function renderGoogleOverlayButton(opts) {
|
|
|
229
256
|
client_id: opts.clientId,
|
|
230
257
|
nonce: opts.nonce,
|
|
231
258
|
callback: (response) => {
|
|
232
|
-
if (response.credential)
|
|
259
|
+
if (response.credential) {
|
|
260
|
+
// Record that native Google has produced a credential at least once this
|
|
261
|
+
// session (read back by {@link diagnoseProvider}), then hand it off.
|
|
262
|
+
googleCredentialMintedThisSession = true;
|
|
233
263
|
opts.onCredential(response.credential);
|
|
264
|
+
}
|
|
234
265
|
else
|
|
235
266
|
opts.onError?.(new Error('Google returned no credential.'));
|
|
236
267
|
},
|
|
@@ -239,17 +270,50 @@ async function renderGoogleOverlayButton(opts) {
|
|
|
239
270
|
const hadPosition = opts.wrapper.style.position !== '';
|
|
240
271
|
if (!hadPosition)
|
|
241
272
|
opts.wrapper.style.position = 'relative';
|
|
273
|
+
const visible = opts.visible ?? false;
|
|
242
274
|
const overlay = doc.createElement('div');
|
|
243
|
-
overlay
|
|
244
|
-
//
|
|
245
|
-
//
|
|
275
|
+
// Invisible-overlay mode (default): Google's button is a transparent click-target
|
|
276
|
+
// laid over the host's own button, so hide it from assistive tech (the host button
|
|
277
|
+
// carries the accessible name). Visible mode (spec 4.5 `googleButton:"google"`):
|
|
278
|
+
// it IS the real, operable button — leave it exposed.
|
|
279
|
+
if (!visible)
|
|
280
|
+
overlay.setAttribute('aria-hidden', 'true');
|
|
281
|
+
// On top, click-catching. opacity 0 => invisible overlay; opacity 1 => Google's own
|
|
282
|
+
// button shown visibly. NO flex centring — GSI's button is stretched to fill the
|
|
283
|
+
// wrapper below (inline), not centred-and-clipped under overflow:hidden.
|
|
246
284
|
overlay.style.cssText =
|
|
247
|
-
|
|
248
|
-
'display:flex;align-items:center;justify-content:center;';
|
|
285
|
+
`position:absolute;inset:0;z-index:2;opacity:${visible ? 1 : 0};overflow:hidden;`;
|
|
249
286
|
opts.wrapper.appendChild(overlay);
|
|
287
|
+
const mounted = { provider: 'google', wrapper: opts.wrapper, overlay };
|
|
288
|
+
mountedOverlays.add(mounted);
|
|
289
|
+
// Force an element GSI injected to fill the overlay exactly. INLINE and
|
|
290
|
+
// synchronous on purpose: the customer found the identical geometry applied via a
|
|
291
|
+
// stylesheet behaved differently from inline (specificity / cascade timing), so
|
|
292
|
+
// the working config sets width/height:100% directly on the style attribute.
|
|
293
|
+
const stretchToFill = (el) => {
|
|
294
|
+
const style = el?.style;
|
|
295
|
+
if (!style)
|
|
296
|
+
return;
|
|
297
|
+
// Guarded so re-applying from the MutationObserver below doesn't churn the DOM
|
|
298
|
+
// or loop against our own attribute writes.
|
|
299
|
+
if (style.width !== '100%')
|
|
300
|
+
style.width = '100%';
|
|
301
|
+
if (style.height !== '100%')
|
|
302
|
+
style.height = '100%';
|
|
303
|
+
};
|
|
304
|
+
// GSI injects its <iframe> ASYNCHRONOUSLY after renderButton() returns and sizes it
|
|
305
|
+
// to a fixed px width — so stretching synchronously only catches GSI's direct child
|
|
306
|
+
// div, never the iframe (it isn't in the DOM yet), leaving the iframe clipped inside
|
|
307
|
+
// the wrapper (the exact "renders but a click misses" defect). Apply to whatever is
|
|
308
|
+
// present now AND re-apply whenever GSI mutates the subtree (observer after draw()).
|
|
309
|
+
const applyStretch = () => {
|
|
310
|
+
stretchToFill(overlay.firstElementChild);
|
|
311
|
+
stretchToFill(overlay.querySelector('iframe'));
|
|
312
|
+
};
|
|
250
313
|
const draw = () => {
|
|
251
314
|
// Google's button width must track the wrapper so every click lands on it;
|
|
252
|
-
// width is fixed at render time, so re-render on resize. Clamp to GSI's range
|
|
315
|
+
// width is fixed at render time, so re-render on resize. Clamp to GSI's range so
|
|
316
|
+
// GSI still draws a real button, which we then CSS-stretch to cover the wrapper.
|
|
253
317
|
const measured = Math.round(opts.wrapper.getBoundingClientRect().width) || 320;
|
|
254
318
|
const width = Math.max(200, Math.min(400, measured));
|
|
255
319
|
overlay.replaceChildren();
|
|
@@ -260,6 +324,54 @@ async function renderGoogleOverlayButton(opts) {
|
|
|
260
324
|
text: 'continue_with',
|
|
261
325
|
width,
|
|
262
326
|
});
|
|
327
|
+
// Customer's working fix: stretch GSI's rendered container (the direct child div
|
|
328
|
+
// GSI creates) AND the <iframe> it injects to fill the wrapper, inline, instead
|
|
329
|
+
// of letting a fixed-size button sit centred under overflow:hidden (which leaves
|
|
330
|
+
// dead zones where a click misses).
|
|
331
|
+
applyStretch();
|
|
332
|
+
verifyCoverage();
|
|
333
|
+
};
|
|
334
|
+
// Dev-only, loud, never-throwing self-check that the transparent overlay actually
|
|
335
|
+
// covers the host button and GSI drew a sane-sized iframe. A healthy-looking button
|
|
336
|
+
// whose overlay doesn't cover it is exactly the "clicks do nothing" bug.
|
|
337
|
+
const rectOf = (r) => ({
|
|
338
|
+
width: r.width,
|
|
339
|
+
height: r.height,
|
|
340
|
+
top: r.top,
|
|
341
|
+
left: r.left,
|
|
342
|
+
right: r.right,
|
|
343
|
+
bottom: r.bottom,
|
|
344
|
+
});
|
|
345
|
+
const verifyCoverage = () => {
|
|
346
|
+
if (!isDevEnv())
|
|
347
|
+
return;
|
|
348
|
+
if (typeof window === 'undefined')
|
|
349
|
+
return; // SSR: nothing to measure.
|
|
350
|
+
try {
|
|
351
|
+
const w = opts.wrapper.getBoundingClientRect();
|
|
352
|
+
const o = overlay.getBoundingClientRect();
|
|
353
|
+
// Overlay must cover the wrapper on every edge (1px rounding slack), or clicks
|
|
354
|
+
// fall through to dead space outside the invisible button.
|
|
355
|
+
const covers = o.left <= w.left + 1 &&
|
|
356
|
+
o.top <= w.top + 1 &&
|
|
357
|
+
o.right >= w.right - 1 &&
|
|
358
|
+
o.bottom >= w.bottom - 1;
|
|
359
|
+
const frame = overlay.querySelector('iframe');
|
|
360
|
+
const fr = frame?.getBoundingClientRect();
|
|
361
|
+
const iframeOk = !!fr && fr.width >= 8 && fr.height >= 8;
|
|
362
|
+
if (!covers || !iframeOk) {
|
|
363
|
+
console.warn('[atlas] Google overlay misaligned/undersized — clicks may miss the invisible GSI button', {
|
|
364
|
+
covers,
|
|
365
|
+
iframeOk,
|
|
366
|
+
wrapper: rectOf(w),
|
|
367
|
+
overlay: rectOf(o),
|
|
368
|
+
iframe: fr ? { width: fr.width, height: fr.height } : null,
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
catch {
|
|
373
|
+
// Dev diagnostics must never disturb a real sign-in.
|
|
374
|
+
}
|
|
263
375
|
};
|
|
264
376
|
draw();
|
|
265
377
|
let observer;
|
|
@@ -268,6 +380,21 @@ async function renderGoogleOverlayButton(opts) {
|
|
|
268
380
|
observer = new RO(() => draw());
|
|
269
381
|
observer.observe(opts.wrapper);
|
|
270
382
|
}
|
|
383
|
+
// The async half of the stretch: GSI injects/resizes its iframe after draw()
|
|
384
|
+
// returns, so watch the overlay subtree and re-stretch the moment that happens.
|
|
385
|
+
// Without this the iframe keeps GSI's fixed px size and stays clipped — the bug a
|
|
386
|
+
// synchronous-only stretch leaves behind.
|
|
387
|
+
let mutationObserver;
|
|
388
|
+
const MO = host.MutationObserver ?? (typeof MutationObserver !== 'undefined' ? MutationObserver : undefined);
|
|
389
|
+
if (MO) {
|
|
390
|
+
mutationObserver = new MO(() => applyStretch());
|
|
391
|
+
mutationObserver.observe(overlay, {
|
|
392
|
+
childList: true,
|
|
393
|
+
subtree: true,
|
|
394
|
+
attributes: true,
|
|
395
|
+
attributeFilter: ['style', 'width', 'height'],
|
|
396
|
+
});
|
|
397
|
+
}
|
|
271
398
|
// One-Tap is opt-in and independent of the button: the same initialized `id`
|
|
272
399
|
// (with the same nonce + callback) drives the prompt, so a One-Tap credential
|
|
273
400
|
// flows through the identical `onCredential` path.
|
|
@@ -276,10 +403,97 @@ async function renderGoogleOverlayButton(opts) {
|
|
|
276
403
|
return {
|
|
277
404
|
destroy: () => {
|
|
278
405
|
observer?.disconnect();
|
|
406
|
+
mutationObserver?.disconnect();
|
|
407
|
+
mountedOverlays.delete(mounted);
|
|
279
408
|
overlay.remove();
|
|
280
409
|
if (!hadPosition)
|
|
281
410
|
opts.wrapper.style.position = '';
|
|
282
411
|
},
|
|
283
412
|
};
|
|
284
413
|
}
|
|
414
|
+
/** Measure a mounted overlay for `provider` against its wrapper, or null. */
|
|
415
|
+
function measureMountedOverlay(provider) {
|
|
416
|
+
if (typeof window === 'undefined')
|
|
417
|
+
return null;
|
|
418
|
+
for (const m of mountedOverlays) {
|
|
419
|
+
if (m.provider !== provider)
|
|
420
|
+
continue;
|
|
421
|
+
try {
|
|
422
|
+
const w = m.wrapper.getBoundingClientRect();
|
|
423
|
+
const o = m.overlay.getBoundingClientRect();
|
|
424
|
+
const frame = m.overlay.querySelector('iframe');
|
|
425
|
+
const fr = frame?.getBoundingClientRect();
|
|
426
|
+
return {
|
|
427
|
+
covers: o.left <= w.left + 1 &&
|
|
428
|
+
o.top <= w.top + 1 &&
|
|
429
|
+
o.right >= w.right - 1 &&
|
|
430
|
+
o.bottom >= w.bottom - 1,
|
|
431
|
+
wrapper: {
|
|
432
|
+
width: w.width,
|
|
433
|
+
height: w.height,
|
|
434
|
+
top: w.top,
|
|
435
|
+
left: w.left,
|
|
436
|
+
right: w.right,
|
|
437
|
+
bottom: w.bottom,
|
|
438
|
+
},
|
|
439
|
+
overlay: {
|
|
440
|
+
width: o.width,
|
|
441
|
+
height: o.height,
|
|
442
|
+
top: o.top,
|
|
443
|
+
left: o.left,
|
|
444
|
+
right: o.right,
|
|
445
|
+
bottom: o.bottom,
|
|
446
|
+
},
|
|
447
|
+
iframe: fr ? { width: fr.width, height: fr.height } : null,
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
catch {
|
|
451
|
+
return null;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
return null;
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Collect the knowable facts about a native provider's setup for a support ticket
|
|
458
|
+
* or a dev console: its resolved `mode` and `client_id` (from
|
|
459
|
+
* `/v1/client/environment`), whether it's native, the current page origin, the
|
|
460
|
+
* live overlay geometry IF a button is mounted, and whether a Google credential has
|
|
461
|
+
* been minted this session. Hook-free, SSR-safe, and never throws — a failed
|
|
462
|
+
* environment fetch simply leaves the server-sourced fields null.
|
|
463
|
+
*
|
|
464
|
+
* It does NOT (and cannot) report the provider's registered JavaScript origins: the
|
|
465
|
+
* caller compares the returned `origin` against what they registered with Google.
|
|
466
|
+
*/
|
|
467
|
+
async function diagnoseProvider(client, provider) {
|
|
468
|
+
const origin = typeof window !== 'undefined' && window.location ? window.location.origin : null;
|
|
469
|
+
let mode = null;
|
|
470
|
+
let clientId = null;
|
|
471
|
+
let native = false;
|
|
472
|
+
try {
|
|
473
|
+
const res = await client.get('/v1/client/environment');
|
|
474
|
+
const p = res.data?.social_providers?.find((x) => x.provider === provider);
|
|
475
|
+
if (p) {
|
|
476
|
+
native = p.native === true;
|
|
477
|
+
clientId = typeof p.client_id === 'string' ? p.client_id : null;
|
|
478
|
+
// `mode` absent but native means the default native mode (see usesNativeGoogle).
|
|
479
|
+
mode = p.mode === 'redirect' ? 'redirect' : p.mode === 'native' ? 'native' : native ? 'native' : null;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
catch {
|
|
483
|
+
// never throw — leave the server-sourced fields at their null defaults.
|
|
484
|
+
}
|
|
485
|
+
return {
|
|
486
|
+
provider,
|
|
487
|
+
mode,
|
|
488
|
+
clientId,
|
|
489
|
+
native,
|
|
490
|
+
origin,
|
|
491
|
+
overlay: measureMountedOverlay(provider),
|
|
492
|
+
credentialMintedThisSession: provider === 'google' ? googleCredentialMintedThisSession : false,
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
/** Reset the session credential flag (tests). */
|
|
496
|
+
function resetGoogleCredentialFlag() {
|
|
497
|
+
googleCredentialMintedThisSession = false;
|
|
498
|
+
}
|
|
285
499
|
//# sourceMappingURL=native.js.map
|
package/dist/native.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.js","sourceRoot":"","sources":["../src/native.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAYH,4CAUC;AAeD,8DASC;AAUD,0CAQC;AASD,oCAoBC;AA0BD,8DAuBC;AAoBD,gEAgBC;AAGD,kEAEC;AAOD,0DAuBC;AAUD,gDA8BC;AAmBD,8DA0EC;AAvVD,iCAAsE;AAQtE,8DAA8D;AAC9D,SAAgB,gBAAgB,CAAC,KAIhC;IACC,OAAO;QACL,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,KAAK,CAAC,OAAO;QACvB,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC/C,CAAC;AACJ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