@dropins/storefront-auth 1.0.5 → 1.0.6
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/chunks/verifyToken.js +2 -2
- package/package.json +1 -1
package/chunks/verifyToken.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*! Copyright 2025 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{Initializer as
|
|
3
|
+
import{Initializer as u}from"@dropins/tools/lib.js";import{events as o}from"@dropins/tools/event-bus.js";import"@dropins/tools/recaptcha.js";import{a as h,d,C as a}from"./getStoreConfig.js";import{a as g,f as m,r as C}from"./network-error.js";const s=new u({init:async t=>{const e={...{authHeaderConfig:{header:"Authorization",tokenPrefix:"Bearer"}},...t};s.config.setConfig(e),p(e.authHeaderConfig.header,e.authHeaderConfig.tokenPrefix)},listeners:()=>[]}),T=s.config,l=`
|
|
4
4
|
query VALIDATE_TOKEN {
|
|
5
5
|
customerCart {
|
|
6
6
|
id
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
`,p=async(t="Authorization",r="Bearer")=>{const e=h(
|
|
9
|
+
`,p=async(t="Authorization",r="Bearer")=>{const e=h(a.auth_dropin_user_token);if(o.emit("authenticated",!!e),!!e)return g(t,`${r} ${e}`),m(l).then(f=>{var n;(n=f.errors)!=null&&n.find(c=>{var i;return((i=c.extensions)==null?void 0:i.category)==="graphql-authentication"})&&(d(a.auth_dropin_user_token),C(t),o.emit("authenticated",!1))})};export{T as c,s as i,p as v};
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "@dropins/storefront-auth", "version": "1.0.
|
|
1
|
+
{"name": "@dropins/storefront-auth", "version": "1.0.6", "@dropins/elsie": "~0.42.0", "license": "SEE LICENSE IN LICENSE.md"}
|