@bounded-sh/client 0.0.20 → 0.0.22
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 +2 -2
- package/dist/index.js +159 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +159 -33
- package/dist/index.mjs.map +1 -1
- package/dist/{index.native-BtM38BVP.js → index.native-C4a8IUpM.js} +163 -37
- package/dist/index.native-C4a8IUpM.js.map +1 -0
- package/dist/{index.native-w12aoVNW.mjs → index.native-C9PMGtxX.mjs} +163 -37
- package/dist/index.native-C9PMGtxX.mjs.map +1 -0
- package/dist/index.native.js +1 -1
- package/dist/index.native.mjs +1 -1
- package/dist/{phantom-wallet-provider-BJWelaiH.js → phantom-wallet-provider-BPRRcIaN.js} +2 -2
- package/dist/{phantom-wallet-provider-BJWelaiH.js.map → phantom-wallet-provider-BPRRcIaN.js.map} +1 -1
- package/dist/{phantom-wallet-provider-BT2V4EU5.mjs → phantom-wallet-provider-DhpV9xKE.mjs} +2 -2
- package/dist/{phantom-wallet-provider-BT2V4EU5.mjs.map → phantom-wallet-provider-DhpV9xKE.mjs.map} +1 -1
- package/dist/{privy-wallet-provider-LV1X7hZe.mjs → privy-wallet-provider-B6QyPXqq.mjs} +3 -3
- package/dist/{privy-wallet-provider-LV1X7hZe.mjs.map → privy-wallet-provider-B6QyPXqq.mjs.map} +1 -1
- package/dist/{privy-wallet-provider-BSh0aZVL.js → privy-wallet-provider-D4W91sqG.js} +3 -3
- package/dist/{privy-wallet-provider-BSh0aZVL.js.map → privy-wallet-provider-D4W91sqG.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-CKsfiyDd.js → solana-mobile-wallet-provider-B0O0BctB.js} +2 -2
- package/dist/{solana-mobile-wallet-provider-CKsfiyDd.js.map → solana-mobile-wallet-provider-B0O0BctB.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-NLe9_mEn.mjs → solana-mobile-wallet-provider-OGKifgCZ.mjs} +2 -2
- package/dist/{solana-mobile-wallet-provider-NLe9_mEn.mjs.map → solana-mobile-wallet-provider-OGKifgCZ.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/index.native-BtM38BVP.js.map +0 -1
- package/dist/index.native-w12aoVNW.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -3968,13 +3968,44 @@ function createEmailModalTree() {
|
|
|
3968
3968
|
close.type = 'button';
|
|
3969
3969
|
close.textContent = '×';
|
|
3970
3970
|
card.appendChild(close);
|
|
3971
|
+
// Brand row — the real Bounded mark (same geometry as bounded.sh) + wordmark.
|
|
3971
3972
|
const brand = document.createElement('div');
|
|
3972
3973
|
brand.className = 'ba-brand';
|
|
3973
|
-
const
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3974
|
+
const mark = document.createElement('span');
|
|
3975
|
+
mark.className = 'ba-mark';
|
|
3976
|
+
mark.setAttribute('aria-hidden', 'true');
|
|
3977
|
+
const svgNs = 'http://www.w3.org/2000/svg';
|
|
3978
|
+
const markSvg = document.createElementNS(svgNs, 'svg');
|
|
3979
|
+
markSvg.setAttribute('width', '24');
|
|
3980
|
+
markSvg.setAttribute('height', '24');
|
|
3981
|
+
markSvg.setAttribute('viewBox', '0 0 32 32');
|
|
3982
|
+
markSvg.setAttribute('fill', 'none');
|
|
3983
|
+
for (const [className, d] of [
|
|
3984
|
+
['ba-c ba-c1', 'M16 5 H5 V16'],
|
|
3985
|
+
['ba-c ba-c2', 'M16 5 H27 V16'],
|
|
3986
|
+
['ba-c ba-c3', 'M5 16 V27 H16'],
|
|
3987
|
+
['ba-c ba-c4', 'M27 16 V27 H16'],
|
|
3988
|
+
]) {
|
|
3989
|
+
const path = document.createElementNS(svgNs, 'path');
|
|
3990
|
+
path.setAttribute('class', className);
|
|
3991
|
+
path.setAttribute('d', d);
|
|
3992
|
+
markSvg.appendChild(path);
|
|
3993
|
+
}
|
|
3994
|
+
mark.appendChild(markSvg);
|
|
3995
|
+
brand.appendChild(mark);
|
|
3996
|
+
const word = document.createElement('span');
|
|
3997
|
+
word.className = 'ba-word';
|
|
3998
|
+
word.textContent = 'bounded';
|
|
3999
|
+
brand.appendChild(word);
|
|
3977
4000
|
card.appendChild(brand);
|
|
4001
|
+
const title = document.createElement('h1');
|
|
4002
|
+
title.className = 'ba-title';
|
|
4003
|
+
title.textContent = 'Sign in';
|
|
4004
|
+
card.appendChild(title);
|
|
4005
|
+
const sub = document.createElement('p');
|
|
4006
|
+
sub.className = 'ba-subtitle';
|
|
4007
|
+
sub.textContent = 'Continue with your email — no wallet needed.';
|
|
4008
|
+
card.appendChild(sub);
|
|
3978
4009
|
const emailStep = document.createElement('div');
|
|
3979
4010
|
emailStep.id = 'ba-email-step';
|
|
3980
4011
|
card.appendChild(emailStep);
|
|
@@ -3995,7 +4026,7 @@ function createEmailModalTree() {
|
|
|
3995
4026
|
emailButton.id = 'ba-email-btn';
|
|
3996
4027
|
emailButton.className = 'ba-btn';
|
|
3997
4028
|
emailButton.type = 'button';
|
|
3998
|
-
emailButton.textContent = 'Continue';
|
|
4029
|
+
emailButton.textContent = 'Continue with email';
|
|
3999
4030
|
emailStep.appendChild(emailButton);
|
|
4000
4031
|
const otpStep = document.createElement('div');
|
|
4001
4032
|
otpStep.id = 'ba-otp-step';
|
|
@@ -4040,37 +4071,67 @@ function createEmailModalTree() {
|
|
|
4040
4071
|
card.appendChild(foot);
|
|
4041
4072
|
return root;
|
|
4042
4073
|
}
|
|
4074
|
+
// Design language matches the hosted Bounded login (auth.bounded.sh) and bounded.sh:
|
|
4075
|
+
// dark editorial panel, green accent, Schibsted Grotesk / Newsreader / JetBrains Mono,
|
|
4076
|
+
// the Bounded mark drawing itself in. Fonts load best-effort (scoped @import); every
|
|
4077
|
+
// rule has a system fallback so the modal looks right even if Google Fonts is blocked.
|
|
4078
|
+
// All selectors are scoped under #bounded-auth-modal so we never leak into the host page.
|
|
4043
4079
|
const MODAL_CSS = `
|
|
4044
|
-
|
|
4080
|
+
@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500&family=Schibsted+Grotesk:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');
|
|
4081
|
+
#bounded-auth-modal{--ba-bg:#0a0a0b;--ba-panel:#0e0f11;--ba-inset:#060607;--ba-raise:#131416;
|
|
4082
|
+
--ba-line:rgba(232,230,222,.08);--ba-line-strong:rgba(232,230,222,.16);
|
|
4083
|
+
--ba-text:#e8e6de;--ba-dim:#9b9991;--ba-faint:#85837c;--ba-green:#58c98f;
|
|
4084
|
+
--ba-green-bg:rgba(88,201,143,.09);--ba-green-line:rgba(88,201,143,.28);--ba-red:#ec8488;
|
|
4085
|
+
--ba-body:'Schibsted Grotesk',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
|
|
4086
|
+
--ba-display:'Newsreader','Iowan Old Style',Georgia,serif;
|
|
4087
|
+
--ba-mono:'JetBrains Mono',ui-monospace,'SF Mono',Menlo,monospace;}
|
|
4088
|
+
#bounded-auth-modal .ba-overlay{position:fixed;inset:0;background:rgba(6,6,7,.66);backdrop-filter:blur(4px);
|
|
4045
4089
|
display:flex;align-items:center;justify-content:center;z-index:2147483000;opacity:1;transition:opacity .16s ease;
|
|
4046
|
-
font-family
|
|
4090
|
+
font-family:var(--ba-body);padding:16px;}
|
|
4047
4091
|
#bounded-auth-modal .ba-overlay.out{opacity:0;}
|
|
4048
|
-
#bounded-auth-modal
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
#bounded-auth-modal .ba-
|
|
4057
|
-
#bounded-auth-modal .ba-
|
|
4058
|
-
#bounded-auth-modal .ba-
|
|
4059
|
-
#bounded-auth-modal .ba-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
#bounded-auth-modal .ba-
|
|
4063
|
-
#bounded-auth-modal .ba-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
#bounded-auth-modal .ba-
|
|
4067
|
-
#bounded-auth-modal .ba-
|
|
4068
|
-
#bounded-auth-modal .ba-
|
|
4069
|
-
#bounded-auth-modal .ba-
|
|
4070
|
-
#bounded-auth-modal .ba-
|
|
4071
|
-
#bounded-auth-modal .ba-
|
|
4092
|
+
#bounded-auth-modal *{box-sizing:border-box;}
|
|
4093
|
+
#bounded-auth-modal .ba-card{width:100%;max-width:372px;background:var(--ba-panel);color:var(--ba-text);
|
|
4094
|
+
border:1px solid var(--ba-line);border-radius:12px;padding:28px 28px 22px;position:relative;
|
|
4095
|
+
box-shadow:0 1px 0 rgba(232,230,222,.03) inset,0 30px 80px -40px rgba(0,0,0,.8);animation:ba-in .18s ease;}
|
|
4096
|
+
@keyframes ba-in{from{transform:translateY(8px);opacity:.5}to{transform:translateY(0);opacity:1}}
|
|
4097
|
+
#bounded-auth-modal .ba-x{position:absolute;top:14px;right:14px;width:28px;height:28px;border:1px solid var(--ba-line);
|
|
4098
|
+
background:var(--ba-raise);color:var(--ba-faint);border-radius:7px;font-size:18px;line-height:1;cursor:pointer;
|
|
4099
|
+
transition:color .15s,border-color .15s;}
|
|
4100
|
+
#bounded-auth-modal .ba-x:hover{color:var(--ba-text);border-color:var(--ba-faint);}
|
|
4101
|
+
#bounded-auth-modal .ba-brand{display:flex;align-items:center;gap:10px;margin:0 0 24px;}
|
|
4102
|
+
#bounded-auth-modal .ba-mark{display:flex;color:var(--ba-text);}
|
|
4103
|
+
#bounded-auth-modal .ba-mark svg{overflow:visible;display:block;}
|
|
4104
|
+
#bounded-auth-modal .ba-c{stroke:currentColor;stroke-width:2.4;fill:none;}
|
|
4105
|
+
@media (prefers-reduced-motion:no-preference){
|
|
4106
|
+
#bounded-auth-modal .ba-c{stroke-dasharray:23;stroke-dashoffset:23;animation:ba-draw .4s cubic-bezier(.45,0,.2,1) forwards;}
|
|
4107
|
+
#bounded-auth-modal .ba-c1{animation-delay:.1s}#bounded-auth-modal .ba-c2{animation-delay:.38s}
|
|
4108
|
+
#bounded-auth-modal .ba-c3{animation-delay:.66s}#bounded-auth-modal .ba-c4{animation-delay:.94s}}
|
|
4109
|
+
@keyframes ba-draw{to{stroke-dashoffset:0}}
|
|
4110
|
+
#bounded-auth-modal .ba-word{font-family:var(--ba-body);font-weight:500;font-size:15px;letter-spacing:.2px;color:var(--ba-text);}
|
|
4111
|
+
#bounded-auth-modal .ba-title{font-family:var(--ba-display);font-weight:400;font-size:25px;letter-spacing:-.01em;margin:0 0 5px;}
|
|
4112
|
+
#bounded-auth-modal .ba-subtitle{color:var(--ba-dim);font-size:14px;margin:0 0 22px;}
|
|
4113
|
+
#bounded-auth-modal .ba-label{display:block;font-size:12px;color:var(--ba-dim);margin:0 0 7px;}
|
|
4114
|
+
#bounded-auth-modal .ba-em{color:var(--ba-text);font-weight:600;}
|
|
4115
|
+
#bounded-auth-modal .ba-input{width:100%;background:var(--ba-inset);border:1px solid var(--ba-line-strong);color:var(--ba-text);
|
|
4116
|
+
border-radius:6px;padding:11px 13px;font-family:var(--ba-body);font-size:15px;outline:none;transition:border-color .15s,box-shadow .15s;}
|
|
4117
|
+
#bounded-auth-modal .ba-input::placeholder{color:var(--ba-faint);}
|
|
4118
|
+
#bounded-auth-modal .ba-input:focus{border-color:var(--ba-green-line);box-shadow:0 0 0 3px var(--ba-green-bg);}
|
|
4119
|
+
#bounded-auth-modal .ba-code{font-family:var(--ba-mono);letter-spacing:8px;text-align:center;font-size:21px;padding-left:8px;}
|
|
4120
|
+
#bounded-auth-modal .ba-btn{width:100%;margin-top:16px;background:var(--ba-text);color:var(--ba-bg);
|
|
4121
|
+
border:0;border-radius:6px;padding:12px;font-family:var(--ba-body);font-size:14px;font-weight:600;cursor:pointer;
|
|
4122
|
+
transition:opacity .15s,transform .04s;}
|
|
4123
|
+
#bounded-auth-modal .ba-btn:hover{opacity:.9;}
|
|
4124
|
+
#bounded-auth-modal .ba-btn:active{transform:translateY(.5px);}
|
|
4125
|
+
#bounded-auth-modal .ba-btn:disabled{opacity:.45;cursor:default;}
|
|
4126
|
+
#bounded-auth-modal .ba-link{width:100%;margin-top:14px;background:none;border:none;color:var(--ba-dim);
|
|
4127
|
+
font-family:var(--ba-body);font-size:12.5px;cursor:pointer;}
|
|
4128
|
+
#bounded-auth-modal .ba-link:hover{color:var(--ba-text);}
|
|
4129
|
+
#bounded-auth-modal .ba-msg{min-height:16px;margin-top:16px;font-size:12.5px;color:var(--ba-dim);text-align:center;}
|
|
4130
|
+
#bounded-auth-modal .ba-msg.err{color:var(--ba-red);}
|
|
4131
|
+
#bounded-auth-modal .ba-foot{margin-top:26px;padding-top:16px;border-top:1px solid var(--ba-line);
|
|
4132
|
+
text-align:center;font-size:11px;color:var(--ba-faint);}
|
|
4072
4133
|
#bounded-auth-modal .hidden{display:none;}
|
|
4073
|
-
@media (max-width:480px){#bounded-auth-modal .ba-card{max-width:none;
|
|
4134
|
+
@media (max-width:480px){#bounded-auth-modal .ba-card{max-width:none;}}`;
|
|
4074
4135
|
|
|
4075
4136
|
const SURFNET_RPC_URL = "https://surfpool.fly.dev";
|
|
4076
4137
|
const SUPPORTED_SOLANA_NETWORKS = new Set([
|
|
@@ -4117,6 +4178,7 @@ function resolveSolanaRpcUrl(explicitRpcUrl, network, context) {
|
|
|
4117
4178
|
}
|
|
4118
4179
|
|
|
4119
4180
|
const PKCE_STORE_KEY = 'bounded.oidc.pkce';
|
|
4181
|
+
const STORED_AUTH_METHOD_KEY$2 = 'bounded_last_auth_method';
|
|
4120
4182
|
// Active session store (Web on web, RN on React Native) — selected by config,
|
|
4121
4183
|
// not by `typeof window` (truthy on RN). OIDC redirect/popup is web-only, but the
|
|
4122
4184
|
// session it mints is read back through this same selector everywhere.
|
|
@@ -4411,6 +4473,10 @@ async function exchangeCode(code, verifier, redirectUri) {
|
|
|
4411
4473
|
const refreshToken = tokenField(data, 'refresh_token', 'refreshToken');
|
|
4412
4474
|
const user = userFromIdToken(idToken);
|
|
4413
4475
|
await sessionManager().storeSession(String(user.address || ''), accessToken, idToken, refreshToken, base);
|
|
4476
|
+
try {
|
|
4477
|
+
getPlatform().storage.setItem(STORED_AUTH_METHOD_KEY$2, 'email');
|
|
4478
|
+
}
|
|
4479
|
+
catch ( /* storage unavailable */_b) { /* storage unavailable */ }
|
|
4414
4480
|
setCurrentUser(user);
|
|
4415
4481
|
setAuthProviderInstance(oidcProviderSingleton);
|
|
4416
4482
|
return user;
|
|
@@ -4421,7 +4487,10 @@ async function exchangeCode(code, verifier, redirectUri) {
|
|
|
4421
4487
|
// (react-dom) when this module is imported on RN.
|
|
4422
4488
|
let currentAuthProvider = null;
|
|
4423
4489
|
let currentAuthMethod = null;
|
|
4490
|
+
let currentAuthProviderConfigKey = null;
|
|
4424
4491
|
let initConfig = null;
|
|
4492
|
+
const objectIdentityKeys = new WeakMap();
|
|
4493
|
+
let nextObjectIdentityKey = 1;
|
|
4425
4494
|
// --- localStorage helpers: track which auth method created the active session ---
|
|
4426
4495
|
const STORED_AUTH_METHOD_KEY$1 = 'bounded_last_auth_method';
|
|
4427
4496
|
function getStoredAuthMethod() {
|
|
@@ -4445,6 +4514,51 @@ function setStoredAuthMethod(method) {
|
|
|
4445
4514
|
// storage might not be available
|
|
4446
4515
|
}
|
|
4447
4516
|
}
|
|
4517
|
+
function objectIdentityKey(value) {
|
|
4518
|
+
if (!value || (typeof value !== 'object' && typeof value !== 'function'))
|
|
4519
|
+
return null;
|
|
4520
|
+
const obj = value;
|
|
4521
|
+
let id = objectIdentityKeys.get(obj);
|
|
4522
|
+
if (!id) {
|
|
4523
|
+
id = nextObjectIdentityKey++;
|
|
4524
|
+
objectIdentityKeys.set(obj, id);
|
|
4525
|
+
}
|
|
4526
|
+
return `object:${id}`;
|
|
4527
|
+
}
|
|
4528
|
+
function stableConfigValue(value, seen = new WeakSet()) {
|
|
4529
|
+
if (value === null || typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean')
|
|
4530
|
+
return value;
|
|
4531
|
+
if (typeof value === 'function')
|
|
4532
|
+
return '[function]';
|
|
4533
|
+
if (Array.isArray(value))
|
|
4534
|
+
return value.map((item) => stableConfigValue(item, seen));
|
|
4535
|
+
if (typeof value === 'object') {
|
|
4536
|
+
if (seen.has(value))
|
|
4537
|
+
return '[circular]';
|
|
4538
|
+
seen.add(value);
|
|
4539
|
+
const out = {};
|
|
4540
|
+
for (const key of Object.keys(value).sort()) {
|
|
4541
|
+
out[key] = stableConfigValue(value[key], seen);
|
|
4542
|
+
}
|
|
4543
|
+
seen.delete(value);
|
|
4544
|
+
return out;
|
|
4545
|
+
}
|
|
4546
|
+
return String(value);
|
|
4547
|
+
}
|
|
4548
|
+
function authProviderConfigKey(config) {
|
|
4549
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4550
|
+
return JSON.stringify({
|
|
4551
|
+
authMethod: (_a = config.authMethod) !== null && _a !== void 0 ? _a : null,
|
|
4552
|
+
chain: (_b = config.chain) !== null && _b !== void 0 ? _b : null,
|
|
4553
|
+
rpcUrl: normalizeSolanaRpcUrl(config.rpcUrl),
|
|
4554
|
+
name: (_c = config.name) !== null && _c !== void 0 ? _c : null,
|
|
4555
|
+
logoUrl: (_d = config.logoUrl) !== null && _d !== void 0 ? _d : null,
|
|
4556
|
+
phantomConfig: stableConfigValue((_e = config.phantomConfig) !== null && _e !== void 0 ? _e : null),
|
|
4557
|
+
privyConfig: stableConfigValue((_f = config.privyConfig) !== null && _f !== void 0 ? _f : null),
|
|
4558
|
+
mobileWalletConfig: stableConfigValue((_g = config.mobileWalletConfig) !== null && _g !== void 0 ? _g : null),
|
|
4559
|
+
privyExpoProvider: objectIdentityKey((_h = config.privyExpoProvider) !== null && _h !== void 0 ? _h : null),
|
|
4560
|
+
});
|
|
4561
|
+
}
|
|
4448
4562
|
/**
|
|
4449
4563
|
* Clears the session if it was created by a different auth method.
|
|
4450
4564
|
* Returns true if the session was cleared, false if the session is compatible.
|
|
@@ -4550,6 +4664,7 @@ async function hotSwapToMWAProvider(config) {
|
|
|
4550
4664
|
}
|
|
4551
4665
|
currentAuthProvider = provider;
|
|
4552
4666
|
currentAuthMethod = 'mobile-wallet-adapter';
|
|
4667
|
+
currentAuthProviderConfigKey = authProviderConfigKey(Object.assign(Object.assign({}, config), { authMethod: 'mobile-wallet-adapter' }));
|
|
4553
4668
|
const coreConfig = await getConfig();
|
|
4554
4669
|
coreConfig.authProvider = provider;
|
|
4555
4670
|
// Send 'phantom' as authMethod so the server routes to Solana verification.
|
|
@@ -4560,12 +4675,18 @@ async function hotSwapToMWAProvider(config) {
|
|
|
4560
4675
|
}
|
|
4561
4676
|
async function getAuthProvider(config) {
|
|
4562
4677
|
var _a, _b;
|
|
4563
|
-
|
|
4678
|
+
const nextProviderConfigKey = config ? authProviderConfigKey(config) : null;
|
|
4679
|
+
if (currentAuthProvider && (!config || currentAuthProviderConfigKey === nextProviderConfigKey)) {
|
|
4564
4680
|
return currentAuthProvider;
|
|
4565
4681
|
}
|
|
4566
4682
|
if (!config) {
|
|
4567
4683
|
throw new Error("Config is required to initialize auth provider");
|
|
4568
4684
|
}
|
|
4685
|
+
if (currentAuthProvider && currentAuthProviderConfigKey !== nextProviderConfigKey) {
|
|
4686
|
+
currentAuthProvider = null;
|
|
4687
|
+
currentAuthMethod = null;
|
|
4688
|
+
currentAuthProviderConfigKey = null;
|
|
4689
|
+
}
|
|
4569
4690
|
initConfig = config;
|
|
4570
4691
|
const authMethod = config.authMethod;
|
|
4571
4692
|
if (!authMethod) {
|
|
@@ -4648,6 +4769,7 @@ async function getAuthProvider(config) {
|
|
|
4648
4769
|
console.log("[Offchain] Wrapping auth provider for Poofnet transaction tracking");
|
|
4649
4770
|
currentAuthProvider = new OffchainAuthProvider(currentAuthProvider);
|
|
4650
4771
|
}
|
|
4772
|
+
currentAuthProviderConfigKey = nextProviderConfigKey;
|
|
4651
4773
|
return currentAuthProvider;
|
|
4652
4774
|
}
|
|
4653
4775
|
/**
|
|
@@ -4677,6 +4799,7 @@ async function signInAnonymously() {
|
|
|
4677
4799
|
const provider = new GuestAuthProvider();
|
|
4678
4800
|
currentAuthProvider = provider;
|
|
4679
4801
|
currentAuthMethod = 'guest';
|
|
4802
|
+
currentAuthProviderConfigKey = 'direct:guest';
|
|
4680
4803
|
const coreConfig = await getConfig();
|
|
4681
4804
|
coreConfig.authProvider = provider;
|
|
4682
4805
|
coreConfig.authMethod = 'guest';
|
|
@@ -4721,6 +4844,7 @@ async function loginWithPrivy(options) {
|
|
|
4721
4844
|
provider = new OffchainAuthProvider(provider);
|
|
4722
4845
|
}
|
|
4723
4846
|
currentAuthProvider = provider;
|
|
4847
|
+
currentAuthProviderConfigKey = authProviderConfigKey(Object.assign(Object.assign({}, coreConfig), { authMethod: currentAuthMethod }));
|
|
4724
4848
|
coreConfig.authProvider = provider;
|
|
4725
4849
|
coreConfig.authMethod = currentAuthMethod;
|
|
4726
4850
|
setAuthProviderInstance(provider);
|
|
@@ -4737,6 +4861,7 @@ async function activateEmailProvider() {
|
|
|
4737
4861
|
const provider = new EmailAuthProvider();
|
|
4738
4862
|
currentAuthProvider = provider;
|
|
4739
4863
|
currentAuthMethod = 'email';
|
|
4864
|
+
currentAuthProviderConfigKey = 'direct:email';
|
|
4740
4865
|
const coreConfig = await getConfig();
|
|
4741
4866
|
coreConfig.authProvider = provider;
|
|
4742
4867
|
coreConfig.authMethod = 'email';
|
|
@@ -4863,6 +4988,7 @@ async function logout$1() {
|
|
|
4863
4988
|
setStoredAuthMethod(null);
|
|
4864
4989
|
currentAuthProvider = null;
|
|
4865
4990
|
currentAuthMethod = null;
|
|
4991
|
+
currentAuthProviderConfigKey = null;
|
|
4866
4992
|
}
|
|
4867
4993
|
|
|
4868
4994
|
/**
|