@clerk/expo 3.0.0-snapshot.v20260113135251 → 3.0.0-snapshot.v20260114095952
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/errorThrower.d.ts +1 -1
- package/dist/hooks/useAuth.d.ts +1 -2
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +2 -2
- package/dist/hooks/useAuth.js.map +1 -1
- package/dist/provider/ClerkProvider.js +1 -1
- package/dist/utils/errors.d.ts +1 -1
- package/package.json +6 -6
package/dist/errorThrower.d.ts
CHANGED
package/dist/hooks/useAuth.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { useAuth as useAuthBase } from '@clerk/react';
|
|
2
1
|
import type { UseAuthReturn } from '@clerk/shared/types';
|
|
3
|
-
export declare const useAuth: (
|
|
2
|
+
export declare const useAuth: (initialAuthState?: any) => UseAuthReturn;
|
|
4
3
|
//# sourceMappingURL=useAuth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../src/hooks/useAuth.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../src/hooks/useAuth.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAA6B,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQpF,eAAO,MAAM,OAAO,GAAI,mBAAmB,GAAG,KAAG,aAuBhD,CAAC"}
|
package/dist/hooks/useAuth.js
CHANGED
|
@@ -24,8 +24,8 @@ module.exports = __toCommonJS(useAuth_exports);
|
|
|
24
24
|
var import_react = require("@clerk/react");
|
|
25
25
|
var import_error = require("@clerk/shared/error");
|
|
26
26
|
var import_cache = require("../cache");
|
|
27
|
-
const useAuth = (
|
|
28
|
-
const { getToken: getTokenBase, ...rest } = (0, import_react.useAuth)(
|
|
27
|
+
const useAuth = (initialAuthState) => {
|
|
28
|
+
const { getToken: getTokenBase, ...rest } = (0, import_react.useAuth)(initialAuthState);
|
|
29
29
|
const getToken = (opts) => getTokenBase(opts).then((token) => {
|
|
30
30
|
if (!opts && import_cache.SessionJWTCache.checkInit()) {
|
|
31
31
|
if (token) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useAuth.ts"],"sourcesContent":["import { useAuth as useAuthBase } from '@clerk/react';\nimport { isNetworkError } from '@clerk/shared/error';\nimport type { GetToken, GetTokenOptions, UseAuthReturn } from '@clerk/shared/types';\n\nimport { SessionJWTCache } from '../cache';\n\n/*\n * This hook extends the useAuth hook to add experimental JWT caching.\n * The caching is used only when no options are passed to getToken.\n */\nexport const useAuth = (
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useAuth.ts"],"sourcesContent":["import { useAuth as useAuthBase } from '@clerk/react';\nimport { isNetworkError } from '@clerk/shared/error';\nimport type { GetToken, GetTokenOptions, UseAuthReturn } from '@clerk/shared/types';\n\nimport { SessionJWTCache } from '../cache';\n\n/*\n * This hook extends the useAuth hook to add experimental JWT caching.\n * The caching is used only when no options are passed to getToken.\n */\nexport const useAuth = (initialAuthState?: any): UseAuthReturn => {\n const { getToken: getTokenBase, ...rest } = useAuthBase(initialAuthState);\n\n const getToken: GetToken = (opts?: GetTokenOptions): Promise<string | null> =>\n getTokenBase(opts)\n .then(token => {\n if (!opts && SessionJWTCache.checkInit()) {\n if (token) {\n void SessionJWTCache.save(token);\n } else {\n void SessionJWTCache.remove();\n }\n }\n return token;\n })\n .catch(error => {\n if (!opts && SessionJWTCache.checkInit() && isNetworkError(error)) {\n return SessionJWTCache.load();\n }\n throw error;\n });\n\n return { ...rest, getToken };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAuC;AACvC,mBAA+B;AAG/B,mBAAgC;AAMzB,MAAM,UAAU,CAAC,qBAA0C;AAChE,QAAM,EAAE,UAAU,cAAc,GAAG,KAAK,QAAI,aAAAA,SAAY,gBAAgB;AAExE,QAAM,WAAqB,CAAC,SAC1B,aAAa,IAAI,EACd,KAAK,WAAS;AACb,QAAI,CAAC,QAAQ,6BAAgB,UAAU,GAAG;AACxC,UAAI,OAAO;AACT,aAAK,6BAAgB,KAAK,KAAK;AAAA,MACjC,OAAO;AACL,aAAK,6BAAgB,OAAO;AAAA,MAC9B;AAAA,IACF;AACA,WAAO;AAAA,EACT,CAAC,EACA,MAAM,WAAS;AACd,QAAI,CAAC,QAAQ,6BAAgB,UAAU,SAAK,6BAAe,KAAK,GAAG;AACjE,aAAO,6BAAgB,KAAK;AAAA,IAC9B;AACA,UAAM;AAAA,EACR,CAAC;AAEL,SAAO,EAAE,GAAG,MAAM,SAAS;AAC7B;","names":["useAuthBase"]}
|
|
@@ -39,7 +39,7 @@ var import_runtime = require("../utils/runtime");
|
|
|
39
39
|
var import_singleton = require("./singleton");
|
|
40
40
|
const SDK_METADATA = {
|
|
41
41
|
name: "@clerk/expo",
|
|
42
|
-
version: "3.0.0-snapshot.
|
|
42
|
+
version: "3.0.0-snapshot.v20260114095952"
|
|
43
43
|
};
|
|
44
44
|
function ClerkProvider(props) {
|
|
45
45
|
const {
|
package/dist/utils/errors.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const errorThrower: import("@clerk/shared/index-
|
|
1
|
+
export declare const errorThrower: import("@clerk/shared/index-BjkQ9z6M").Zn;
|
|
2
2
|
//# sourceMappingURL=errors.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clerk/expo",
|
|
3
|
-
"version": "3.0.0-snapshot.
|
|
3
|
+
"version": "3.0.0-snapshot.v20260114095952",
|
|
4
4
|
"description": "Clerk React Native/Expo library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"base-64": "^1.0.0",
|
|
77
77
|
"react-native-url-polyfill": "2.0.0",
|
|
78
78
|
"tslib": "2.8.1",
|
|
79
|
-
"@clerk/clerk-js": "6.0.0-snapshot.
|
|
80
|
-
"@clerk/react": "6.0.0-snapshot.
|
|
81
|
-
"@clerk/shared": "4.0.0-snapshot.
|
|
79
|
+
"@clerk/clerk-js": "6.0.0-snapshot.v20260114095952",
|
|
80
|
+
"@clerk/react": "6.0.0-snapshot.v20260114095952",
|
|
81
|
+
"@clerk/shared": "4.0.0-snapshot.v20260114095952"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@expo/config-plugins": "^54.0.4",
|
|
@@ -92,10 +92,10 @@
|
|
|
92
92
|
"expo-secure-store": "^12.8.1",
|
|
93
93
|
"expo-web-browser": "^12.8.2",
|
|
94
94
|
"react-native": "^0.81.4",
|
|
95
|
-
"@clerk/expo-passkeys": "1.0.0-snapshot.
|
|
95
|
+
"@clerk/expo-passkeys": "1.0.0-snapshot.v20260114095952"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
|
-
"@clerk/expo-passkeys": "1.0.0-snapshot.
|
|
98
|
+
"@clerk/expo-passkeys": "1.0.0-snapshot.v20260114095952",
|
|
99
99
|
"expo": ">=53 <55",
|
|
100
100
|
"expo-apple-authentication": ">=7.0.0",
|
|
101
101
|
"expo-auth-session": ">=5",
|