@bounded-sh/client 0.0.20 → 0.0.21
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 +148 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +148 -33
- package/dist/index.mjs.map +1 -1
- package/dist/{index.native-BtM38BVP.js → index.native-DdKzAUjN.js} +152 -37
- package/dist/index.native-DdKzAUjN.js.map +1 -0
- package/dist/{index.native-w12aoVNW.mjs → index.native-N3xLU862.mjs} +152 -37
- package/dist/index.native-N3xLU862.mjs.map +1 -0
- package/dist/index.native.js +1 -1
- package/dist/index.native.mjs +1 -1
- package/dist/{phantom-wallet-provider-BT2V4EU5.mjs → phantom-wallet-provider-DcE4A2_e.mjs} +2 -2
- package/dist/{phantom-wallet-provider-BT2V4EU5.mjs.map → phantom-wallet-provider-DcE4A2_e.mjs.map} +1 -1
- package/dist/{phantom-wallet-provider-BJWelaiH.js → phantom-wallet-provider-Dz9lQvNv.js} +2 -2
- package/dist/{phantom-wallet-provider-BJWelaiH.js.map → phantom-wallet-provider-Dz9lQvNv.js.map} +1 -1
- package/dist/{privy-wallet-provider-BSh0aZVL.js → privy-wallet-provider-DUvjxNXK.js} +3 -3
- package/dist/{privy-wallet-provider-BSh0aZVL.js.map → privy-wallet-provider-DUvjxNXK.js.map} +1 -1
- package/dist/{privy-wallet-provider-LV1X7hZe.mjs → privy-wallet-provider-oG3o5vko.mjs} +3 -3
- package/dist/{privy-wallet-provider-LV1X7hZe.mjs.map → privy-wallet-provider-oG3o5vko.mjs.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-CKsfiyDd.js → solana-mobile-wallet-provider-DdBoG6c2.js} +2 -2
- package/dist/{solana-mobile-wallet-provider-CKsfiyDd.js.map → solana-mobile-wallet-provider-DdBoG6c2.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-NLe9_mEn.mjs → solana-mobile-wallet-provider-aS60_GZR.mjs} +2 -2
- package/dist/{solana-mobile-wallet-provider-NLe9_mEn.mjs.map → solana-mobile-wallet-provider-aS60_GZR.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,33 @@ 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
|
+
mark.innerHTML =
|
|
3978
|
+
'<svg width="24" height="24" viewBox="0 0 32 32" fill="none">' +
|
|
3979
|
+
'<path class="ba-c ba-c1" d="M16 5 H5 V16"/>' +
|
|
3980
|
+
'<path class="ba-c ba-c2" d="M16 5 H27 V16"/>' +
|
|
3981
|
+
'<path class="ba-c ba-c3" d="M5 16 V27 H16"/>' +
|
|
3982
|
+
'<path class="ba-c ba-c4" d="M27 16 V27 H16"/>' +
|
|
3983
|
+
'</svg>';
|
|
3984
|
+
brand.appendChild(mark);
|
|
3985
|
+
const word = document.createElement('span');
|
|
3986
|
+
word.className = 'ba-word';
|
|
3987
|
+
word.textContent = 'bounded';
|
|
3988
|
+
brand.appendChild(word);
|
|
3977
3989
|
card.appendChild(brand);
|
|
3990
|
+
const title = document.createElement('h1');
|
|
3991
|
+
title.className = 'ba-title';
|
|
3992
|
+
title.textContent = 'Sign in';
|
|
3993
|
+
card.appendChild(title);
|
|
3994
|
+
const sub = document.createElement('p');
|
|
3995
|
+
sub.className = 'ba-subtitle';
|
|
3996
|
+
sub.textContent = 'Continue with your email — no wallet needed.';
|
|
3997
|
+
card.appendChild(sub);
|
|
3978
3998
|
const emailStep = document.createElement('div');
|
|
3979
3999
|
emailStep.id = 'ba-email-step';
|
|
3980
4000
|
card.appendChild(emailStep);
|
|
@@ -3995,7 +4015,7 @@ function createEmailModalTree() {
|
|
|
3995
4015
|
emailButton.id = 'ba-email-btn';
|
|
3996
4016
|
emailButton.className = 'ba-btn';
|
|
3997
4017
|
emailButton.type = 'button';
|
|
3998
|
-
emailButton.textContent = 'Continue';
|
|
4018
|
+
emailButton.textContent = 'Continue with email';
|
|
3999
4019
|
emailStep.appendChild(emailButton);
|
|
4000
4020
|
const otpStep = document.createElement('div');
|
|
4001
4021
|
otpStep.id = 'ba-otp-step';
|
|
@@ -4040,37 +4060,67 @@ function createEmailModalTree() {
|
|
|
4040
4060
|
card.appendChild(foot);
|
|
4041
4061
|
return root;
|
|
4042
4062
|
}
|
|
4063
|
+
// Design language matches the hosted Bounded login (auth.bounded.sh) and bounded.sh:
|
|
4064
|
+
// dark editorial panel, green accent, Schibsted Grotesk / Newsreader / JetBrains Mono,
|
|
4065
|
+
// the Bounded mark drawing itself in. Fonts load best-effort (scoped @import); every
|
|
4066
|
+
// rule has a system fallback so the modal looks right even if Google Fonts is blocked.
|
|
4067
|
+
// All selectors are scoped under #bounded-auth-modal so we never leak into the host page.
|
|
4043
4068
|
const MODAL_CSS = `
|
|
4044
|
-
|
|
4069
|
+
@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');
|
|
4070
|
+
#bounded-auth-modal{--ba-bg:#0a0a0b;--ba-panel:#0e0f11;--ba-inset:#060607;--ba-raise:#131416;
|
|
4071
|
+
--ba-line:rgba(232,230,222,.08);--ba-line-strong:rgba(232,230,222,.16);
|
|
4072
|
+
--ba-text:#e8e6de;--ba-dim:#9b9991;--ba-faint:#85837c;--ba-green:#58c98f;
|
|
4073
|
+
--ba-green-bg:rgba(88,201,143,.09);--ba-green-line:rgba(88,201,143,.28);--ba-red:#ec8488;
|
|
4074
|
+
--ba-body:'Schibsted Grotesk',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
|
|
4075
|
+
--ba-display:'Newsreader','Iowan Old Style',Georgia,serif;
|
|
4076
|
+
--ba-mono:'JetBrains Mono',ui-monospace,'SF Mono',Menlo,monospace;}
|
|
4077
|
+
#bounded-auth-modal .ba-overlay{position:fixed;inset:0;background:rgba(6,6,7,.66);backdrop-filter:blur(4px);
|
|
4045
4078
|
display:flex;align-items:center;justify-content:center;z-index:2147483000;opacity:1;transition:opacity .16s ease;
|
|
4046
|
-
font-family
|
|
4079
|
+
font-family:var(--ba-body);padding:16px;}
|
|
4047
4080
|
#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-
|
|
4081
|
+
#bounded-auth-modal *{box-sizing:border-box;}
|
|
4082
|
+
#bounded-auth-modal .ba-card{width:100%;max-width:372px;background:var(--ba-panel);color:var(--ba-text);
|
|
4083
|
+
border:1px solid var(--ba-line);border-radius:12px;padding:28px 28px 22px;position:relative;
|
|
4084
|
+
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;}
|
|
4085
|
+
@keyframes ba-in{from{transform:translateY(8px);opacity:.5}to{transform:translateY(0);opacity:1}}
|
|
4086
|
+
#bounded-auth-modal .ba-x{position:absolute;top:14px;right:14px;width:28px;height:28px;border:1px solid var(--ba-line);
|
|
4087
|
+
background:var(--ba-raise);color:var(--ba-faint);border-radius:7px;font-size:18px;line-height:1;cursor:pointer;
|
|
4088
|
+
transition:color .15s,border-color .15s;}
|
|
4089
|
+
#bounded-auth-modal .ba-x:hover{color:var(--ba-text);border-color:var(--ba-faint);}
|
|
4090
|
+
#bounded-auth-modal .ba-brand{display:flex;align-items:center;gap:10px;margin:0 0 24px;}
|
|
4091
|
+
#bounded-auth-modal .ba-mark{display:flex;color:var(--ba-text);}
|
|
4092
|
+
#bounded-auth-modal .ba-mark svg{overflow:visible;display:block;}
|
|
4093
|
+
#bounded-auth-modal .ba-c{stroke:currentColor;stroke-width:2.4;fill:none;}
|
|
4094
|
+
@media (prefers-reduced-motion:no-preference){
|
|
4095
|
+
#bounded-auth-modal .ba-c{stroke-dasharray:23;stroke-dashoffset:23;animation:ba-draw .4s cubic-bezier(.45,0,.2,1) forwards;}
|
|
4096
|
+
#bounded-auth-modal .ba-c1{animation-delay:.1s}#bounded-auth-modal .ba-c2{animation-delay:.38s}
|
|
4097
|
+
#bounded-auth-modal .ba-c3{animation-delay:.66s}#bounded-auth-modal .ba-c4{animation-delay:.94s}}
|
|
4098
|
+
@keyframes ba-draw{to{stroke-dashoffset:0}}
|
|
4099
|
+
#bounded-auth-modal .ba-word{font-family:var(--ba-body);font-weight:500;font-size:15px;letter-spacing:.2px;color:var(--ba-text);}
|
|
4100
|
+
#bounded-auth-modal .ba-title{font-family:var(--ba-display);font-weight:400;font-size:25px;letter-spacing:-.01em;margin:0 0 5px;}
|
|
4101
|
+
#bounded-auth-modal .ba-subtitle{color:var(--ba-dim);font-size:14px;margin:0 0 22px;}
|
|
4102
|
+
#bounded-auth-modal .ba-label{display:block;font-size:12px;color:var(--ba-dim);margin:0 0 7px;}
|
|
4103
|
+
#bounded-auth-modal .ba-em{color:var(--ba-text);font-weight:600;}
|
|
4104
|
+
#bounded-auth-modal .ba-input{width:100%;background:var(--ba-inset);border:1px solid var(--ba-line-strong);color:var(--ba-text);
|
|
4105
|
+
border-radius:6px;padding:11px 13px;font-family:var(--ba-body);font-size:15px;outline:none;transition:border-color .15s,box-shadow .15s;}
|
|
4106
|
+
#bounded-auth-modal .ba-input::placeholder{color:var(--ba-faint);}
|
|
4107
|
+
#bounded-auth-modal .ba-input:focus{border-color:var(--ba-green-line);box-shadow:0 0 0 3px var(--ba-green-bg);}
|
|
4108
|
+
#bounded-auth-modal .ba-code{font-family:var(--ba-mono);letter-spacing:8px;text-align:center;font-size:21px;padding-left:8px;}
|
|
4109
|
+
#bounded-auth-modal .ba-btn{width:100%;margin-top:16px;background:var(--ba-text);color:var(--ba-bg);
|
|
4110
|
+
border:0;border-radius:6px;padding:12px;font-family:var(--ba-body);font-size:14px;font-weight:600;cursor:pointer;
|
|
4111
|
+
transition:opacity .15s,transform .04s;}
|
|
4112
|
+
#bounded-auth-modal .ba-btn:hover{opacity:.9;}
|
|
4113
|
+
#bounded-auth-modal .ba-btn:active{transform:translateY(.5px);}
|
|
4114
|
+
#bounded-auth-modal .ba-btn:disabled{opacity:.45;cursor:default;}
|
|
4115
|
+
#bounded-auth-modal .ba-link{width:100%;margin-top:14px;background:none;border:none;color:var(--ba-dim);
|
|
4116
|
+
font-family:var(--ba-body);font-size:12.5px;cursor:pointer;}
|
|
4117
|
+
#bounded-auth-modal .ba-link:hover{color:var(--ba-text);}
|
|
4118
|
+
#bounded-auth-modal .ba-msg{min-height:16px;margin-top:16px;font-size:12.5px;color:var(--ba-dim);text-align:center;}
|
|
4119
|
+
#bounded-auth-modal .ba-msg.err{color:var(--ba-red);}
|
|
4120
|
+
#bounded-auth-modal .ba-foot{margin-top:26px;padding-top:16px;border-top:1px solid var(--ba-line);
|
|
4121
|
+
text-align:center;font-size:11px;color:var(--ba-faint);}
|
|
4072
4122
|
#bounded-auth-modal .hidden{display:none;}
|
|
4073
|
-
@media (max-width:480px){#bounded-auth-modal .ba-card{max-width:none;
|
|
4123
|
+
@media (max-width:480px){#bounded-auth-modal .ba-card{max-width:none;}}`;
|
|
4074
4124
|
|
|
4075
4125
|
const SURFNET_RPC_URL = "https://surfpool.fly.dev";
|
|
4076
4126
|
const SUPPORTED_SOLANA_NETWORKS = new Set([
|
|
@@ -4117,6 +4167,7 @@ function resolveSolanaRpcUrl(explicitRpcUrl, network, context) {
|
|
|
4117
4167
|
}
|
|
4118
4168
|
|
|
4119
4169
|
const PKCE_STORE_KEY = 'bounded.oidc.pkce';
|
|
4170
|
+
const STORED_AUTH_METHOD_KEY$2 = 'bounded_last_auth_method';
|
|
4120
4171
|
// Active session store (Web on web, RN on React Native) — selected by config,
|
|
4121
4172
|
// not by `typeof window` (truthy on RN). OIDC redirect/popup is web-only, but the
|
|
4122
4173
|
// session it mints is read back through this same selector everywhere.
|
|
@@ -4411,6 +4462,10 @@ async function exchangeCode(code, verifier, redirectUri) {
|
|
|
4411
4462
|
const refreshToken = tokenField(data, 'refresh_token', 'refreshToken');
|
|
4412
4463
|
const user = userFromIdToken(idToken);
|
|
4413
4464
|
await sessionManager().storeSession(String(user.address || ''), accessToken, idToken, refreshToken, base);
|
|
4465
|
+
try {
|
|
4466
|
+
getPlatform().storage.setItem(STORED_AUTH_METHOD_KEY$2, 'email');
|
|
4467
|
+
}
|
|
4468
|
+
catch ( /* storage unavailable */_b) { /* storage unavailable */ }
|
|
4414
4469
|
setCurrentUser(user);
|
|
4415
4470
|
setAuthProviderInstance(oidcProviderSingleton);
|
|
4416
4471
|
return user;
|
|
@@ -4421,7 +4476,10 @@ async function exchangeCode(code, verifier, redirectUri) {
|
|
|
4421
4476
|
// (react-dom) when this module is imported on RN.
|
|
4422
4477
|
let currentAuthProvider = null;
|
|
4423
4478
|
let currentAuthMethod = null;
|
|
4479
|
+
let currentAuthProviderConfigKey = null;
|
|
4424
4480
|
let initConfig = null;
|
|
4481
|
+
const objectIdentityKeys = new WeakMap();
|
|
4482
|
+
let nextObjectIdentityKey = 1;
|
|
4425
4483
|
// --- localStorage helpers: track which auth method created the active session ---
|
|
4426
4484
|
const STORED_AUTH_METHOD_KEY$1 = 'bounded_last_auth_method';
|
|
4427
4485
|
function getStoredAuthMethod() {
|
|
@@ -4445,6 +4503,51 @@ function setStoredAuthMethod(method) {
|
|
|
4445
4503
|
// storage might not be available
|
|
4446
4504
|
}
|
|
4447
4505
|
}
|
|
4506
|
+
function objectIdentityKey(value) {
|
|
4507
|
+
if (!value || (typeof value !== 'object' && typeof value !== 'function'))
|
|
4508
|
+
return null;
|
|
4509
|
+
const obj = value;
|
|
4510
|
+
let id = objectIdentityKeys.get(obj);
|
|
4511
|
+
if (!id) {
|
|
4512
|
+
id = nextObjectIdentityKey++;
|
|
4513
|
+
objectIdentityKeys.set(obj, id);
|
|
4514
|
+
}
|
|
4515
|
+
return `object:${id}`;
|
|
4516
|
+
}
|
|
4517
|
+
function stableConfigValue(value, seen = new WeakSet()) {
|
|
4518
|
+
if (value === null || typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean')
|
|
4519
|
+
return value;
|
|
4520
|
+
if (typeof value === 'function')
|
|
4521
|
+
return '[function]';
|
|
4522
|
+
if (Array.isArray(value))
|
|
4523
|
+
return value.map((item) => stableConfigValue(item, seen));
|
|
4524
|
+
if (typeof value === 'object') {
|
|
4525
|
+
if (seen.has(value))
|
|
4526
|
+
return '[circular]';
|
|
4527
|
+
seen.add(value);
|
|
4528
|
+
const out = {};
|
|
4529
|
+
for (const key of Object.keys(value).sort()) {
|
|
4530
|
+
out[key] = stableConfigValue(value[key], seen);
|
|
4531
|
+
}
|
|
4532
|
+
seen.delete(value);
|
|
4533
|
+
return out;
|
|
4534
|
+
}
|
|
4535
|
+
return String(value);
|
|
4536
|
+
}
|
|
4537
|
+
function authProviderConfigKey(config) {
|
|
4538
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4539
|
+
return JSON.stringify({
|
|
4540
|
+
authMethod: (_a = config.authMethod) !== null && _a !== void 0 ? _a : null,
|
|
4541
|
+
chain: (_b = config.chain) !== null && _b !== void 0 ? _b : null,
|
|
4542
|
+
rpcUrl: normalizeSolanaRpcUrl(config.rpcUrl),
|
|
4543
|
+
name: (_c = config.name) !== null && _c !== void 0 ? _c : null,
|
|
4544
|
+
logoUrl: (_d = config.logoUrl) !== null && _d !== void 0 ? _d : null,
|
|
4545
|
+
phantomConfig: stableConfigValue((_e = config.phantomConfig) !== null && _e !== void 0 ? _e : null),
|
|
4546
|
+
privyConfig: stableConfigValue((_f = config.privyConfig) !== null && _f !== void 0 ? _f : null),
|
|
4547
|
+
mobileWalletConfig: stableConfigValue((_g = config.mobileWalletConfig) !== null && _g !== void 0 ? _g : null),
|
|
4548
|
+
privyExpoProvider: objectIdentityKey((_h = config.privyExpoProvider) !== null && _h !== void 0 ? _h : null),
|
|
4549
|
+
});
|
|
4550
|
+
}
|
|
4448
4551
|
/**
|
|
4449
4552
|
* Clears the session if it was created by a different auth method.
|
|
4450
4553
|
* Returns true if the session was cleared, false if the session is compatible.
|
|
@@ -4550,6 +4653,7 @@ async function hotSwapToMWAProvider(config) {
|
|
|
4550
4653
|
}
|
|
4551
4654
|
currentAuthProvider = provider;
|
|
4552
4655
|
currentAuthMethod = 'mobile-wallet-adapter';
|
|
4656
|
+
currentAuthProviderConfigKey = authProviderConfigKey(Object.assign(Object.assign({}, config), { authMethod: 'mobile-wallet-adapter' }));
|
|
4553
4657
|
const coreConfig = await getConfig();
|
|
4554
4658
|
coreConfig.authProvider = provider;
|
|
4555
4659
|
// Send 'phantom' as authMethod so the server routes to Solana verification.
|
|
@@ -4560,12 +4664,18 @@ async function hotSwapToMWAProvider(config) {
|
|
|
4560
4664
|
}
|
|
4561
4665
|
async function getAuthProvider(config) {
|
|
4562
4666
|
var _a, _b;
|
|
4563
|
-
|
|
4667
|
+
const nextProviderConfigKey = config ? authProviderConfigKey(config) : null;
|
|
4668
|
+
if (currentAuthProvider && (!config || currentAuthProviderConfigKey === nextProviderConfigKey)) {
|
|
4564
4669
|
return currentAuthProvider;
|
|
4565
4670
|
}
|
|
4566
4671
|
if (!config) {
|
|
4567
4672
|
throw new Error("Config is required to initialize auth provider");
|
|
4568
4673
|
}
|
|
4674
|
+
if (currentAuthProvider && currentAuthProviderConfigKey !== nextProviderConfigKey) {
|
|
4675
|
+
currentAuthProvider = null;
|
|
4676
|
+
currentAuthMethod = null;
|
|
4677
|
+
currentAuthProviderConfigKey = null;
|
|
4678
|
+
}
|
|
4569
4679
|
initConfig = config;
|
|
4570
4680
|
const authMethod = config.authMethod;
|
|
4571
4681
|
if (!authMethod) {
|
|
@@ -4648,6 +4758,7 @@ async function getAuthProvider(config) {
|
|
|
4648
4758
|
console.log("[Offchain] Wrapping auth provider for Poofnet transaction tracking");
|
|
4649
4759
|
currentAuthProvider = new OffchainAuthProvider(currentAuthProvider);
|
|
4650
4760
|
}
|
|
4761
|
+
currentAuthProviderConfigKey = nextProviderConfigKey;
|
|
4651
4762
|
return currentAuthProvider;
|
|
4652
4763
|
}
|
|
4653
4764
|
/**
|
|
@@ -4677,6 +4788,7 @@ async function signInAnonymously() {
|
|
|
4677
4788
|
const provider = new GuestAuthProvider();
|
|
4678
4789
|
currentAuthProvider = provider;
|
|
4679
4790
|
currentAuthMethod = 'guest';
|
|
4791
|
+
currentAuthProviderConfigKey = 'direct:guest';
|
|
4680
4792
|
const coreConfig = await getConfig();
|
|
4681
4793
|
coreConfig.authProvider = provider;
|
|
4682
4794
|
coreConfig.authMethod = 'guest';
|
|
@@ -4721,6 +4833,7 @@ async function loginWithPrivy(options) {
|
|
|
4721
4833
|
provider = new OffchainAuthProvider(provider);
|
|
4722
4834
|
}
|
|
4723
4835
|
currentAuthProvider = provider;
|
|
4836
|
+
currentAuthProviderConfigKey = authProviderConfigKey(Object.assign(Object.assign({}, coreConfig), { authMethod: currentAuthMethod }));
|
|
4724
4837
|
coreConfig.authProvider = provider;
|
|
4725
4838
|
coreConfig.authMethod = currentAuthMethod;
|
|
4726
4839
|
setAuthProviderInstance(provider);
|
|
@@ -4737,6 +4850,7 @@ async function activateEmailProvider() {
|
|
|
4737
4850
|
const provider = new EmailAuthProvider();
|
|
4738
4851
|
currentAuthProvider = provider;
|
|
4739
4852
|
currentAuthMethod = 'email';
|
|
4853
|
+
currentAuthProviderConfigKey = 'direct:email';
|
|
4740
4854
|
const coreConfig = await getConfig();
|
|
4741
4855
|
coreConfig.authProvider = provider;
|
|
4742
4856
|
coreConfig.authMethod = 'email';
|
|
@@ -4863,6 +4977,7 @@ async function logout$1() {
|
|
|
4863
4977
|
setStoredAuthMethod(null);
|
|
4864
4978
|
currentAuthProvider = null;
|
|
4865
4979
|
currentAuthMethod = null;
|
|
4980
|
+
currentAuthProviderConfigKey = null;
|
|
4866
4981
|
}
|
|
4867
4982
|
|
|
4868
4983
|
/**
|