@multiplatform.one/keycloak 1.0.13 → 1.0.15
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/cjs/Authenticated.js +3 -5
- package/dist/cjs/Authenticated.js.map +1 -1
- package/dist/cjs/Authenticated.native.js +7 -9
- package/dist/cjs/Authenticated.native.js.map +2 -2
- package/dist/cjs/authConfig.native.js.map +1 -1
- package/dist/cjs/hooks/index.native.js.map +1 -1
- package/dist/cjs/hooks/useAuthConfig.native.js.map +1 -1
- package/dist/cjs/hooks/useTokensFromQuery/index.js +1 -2
- package/dist/cjs/hooks/useTokensFromQuery/index.js.map +1 -1
- package/dist/cjs/hooks/useTokensFromQuery/index.native.js.map +1 -1
- package/dist/cjs/hooks/useTokensFromState.native.js.map +1 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/keycloak/config.native.js.map +1 -1
- package/dist/cjs/keycloak/context.native.js.map +1 -1
- package/dist/cjs/keycloak/index.native.js.map +1 -1
- package/dist/cjs/keycloak/keycloak.js +4 -19
- package/dist/cjs/keycloak/keycloak.js.map +1 -1
- package/dist/cjs/keycloak/keycloak.native.js +59 -61
- package/dist/cjs/keycloak/keycloak.native.js.map +2 -2
- package/dist/cjs/provider/AfterAuth.native.js.map +1 -1
- package/dist/cjs/provider/AuthProvider/AuthProvider.js +10 -10
- package/dist/cjs/provider/AuthProvider/AuthProvider.js.map +1 -1
- package/dist/cjs/provider/AuthProvider/AuthProvider.native.js +61 -74
- package/dist/cjs/provider/AuthProvider/AuthProvider.native.js.map +2 -2
- package/dist/cjs/provider/AuthProvider/index.native.js.map +1 -1
- package/dist/cjs/provider/KeycloakProvider.native.js.map +1 -1
- package/dist/cjs/provider/index.native.js.map +1 -1
- package/dist/cjs/routes.js +4 -6
- package/dist/cjs/routes.js.map +1 -1
- package/dist/cjs/routes.native.js +71 -81
- package/dist/cjs/routes.native.js.map +3 -3
- package/dist/cjs/session/index.native.js.map +1 -1
- package/dist/cjs/session/session.js +3 -22
- package/dist/cjs/session/session.js.map +2 -2
- package/dist/cjs/session/session.native.js +53 -58
- package/dist/cjs/session/session.native.js.map +2 -2
- package/dist/cjs/state.native.js.map +1 -1
- package/dist/cjs/token.native.js.map +1 -1
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/esm/Authenticated.js +3 -5
- package/dist/esm/Authenticated.js.map +1 -1
- package/dist/esm/Authenticated.mjs +1 -1
- package/dist/esm/Authenticated.native.js +7 -9
- package/dist/esm/Authenticated.native.js.map +3 -3
- package/dist/esm/authConfig.native.js.map +1 -1
- package/dist/esm/hooks/index.native.js.map +1 -1
- package/dist/esm/hooks/useAuthConfig.native.js.map +1 -1
- package/dist/esm/hooks/useTokensFromQuery/index.js +1 -2
- package/dist/esm/hooks/useTokensFromQuery/index.js.map +1 -1
- package/dist/esm/hooks/useTokensFromQuery/index.native.js.map +1 -1
- package/dist/esm/hooks/useTokensFromState.native.js.map +1 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/keycloak/config.native.js.map +1 -1
- package/dist/esm/keycloak/context.native.js.map +1 -1
- package/dist/esm/keycloak/index.native.js.map +1 -1
- package/dist/esm/keycloak/keycloak.js +5 -20
- package/dist/esm/keycloak/keycloak.js.map +1 -1
- package/dist/esm/keycloak/keycloak.mjs +2 -13
- package/dist/esm/keycloak/keycloak.native.js +59 -61
- package/dist/esm/keycloak/keycloak.native.js.map +2 -2
- package/dist/esm/provider/AfterAuth.native.js.map +1 -1
- package/dist/esm/provider/AuthProvider/AuthProvider.js +10 -10
- package/dist/esm/provider/AuthProvider/AuthProvider.js.map +1 -1
- package/dist/esm/provider/AuthProvider/AuthProvider.mjs +9 -5
- package/dist/esm/provider/AuthProvider/AuthProvider.native.js +61 -74
- package/dist/esm/provider/AuthProvider/AuthProvider.native.js.map +2 -2
- package/dist/esm/provider/AuthProvider/index.native.js.map +1 -1
- package/dist/esm/provider/KeycloakProvider.native.js.map +1 -1
- package/dist/esm/provider/index.native.js.map +1 -1
- package/dist/esm/routes.js +4 -6
- package/dist/esm/routes.js.map +1 -1
- package/dist/esm/routes.mjs +2 -2
- package/dist/esm/routes.native.js +71 -81
- package/dist/esm/routes.native.js.map +3 -3
- package/dist/esm/session/index.native.js.map +1 -1
- package/dist/esm/session/session.js +2 -13
- package/dist/esm/session/session.js.map +2 -2
- package/dist/esm/session/session.mjs +3 -12
- package/dist/esm/session/session.native.js +53 -58
- package/dist/esm/session/session.native.js.map +2 -2
- package/dist/esm/state.native.js.map +1 -1
- package/dist/esm/token.native.js.map +1 -1
- package/dist/jsx/Authenticated.js +3 -5
- package/dist/jsx/Authenticated.js.map +1 -1
- package/dist/jsx/Authenticated.mjs +1 -1
- package/dist/jsx/Authenticated.native.js +7 -9
- package/dist/jsx/Authenticated.native.js.map +3 -3
- package/dist/jsx/authConfig.native.js.map +1 -1
- package/dist/jsx/hooks/index.native.js.map +1 -1
- package/dist/jsx/hooks/useAuthConfig.native.js.map +1 -1
- package/dist/jsx/hooks/useTokensFromQuery/index.js +1 -2
- package/dist/jsx/hooks/useTokensFromQuery/index.js.map +1 -1
- package/dist/jsx/hooks/useTokensFromQuery/index.native.js.map +1 -1
- package/dist/jsx/hooks/useTokensFromState.native.js.map +1 -1
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/keycloak/config.native.js.map +1 -1
- package/dist/jsx/keycloak/context.native.js.map +1 -1
- package/dist/jsx/keycloak/index.native.js.map +1 -1
- package/dist/jsx/keycloak/keycloak.js +5 -20
- package/dist/jsx/keycloak/keycloak.js.map +1 -1
- package/dist/jsx/keycloak/keycloak.mjs +2 -13
- package/dist/jsx/keycloak/keycloak.native.js +59 -61
- package/dist/jsx/keycloak/keycloak.native.js.map +2 -2
- package/dist/jsx/provider/AfterAuth.native.js.map +1 -1
- package/dist/jsx/provider/AuthProvider/AuthProvider.js +10 -10
- package/dist/jsx/provider/AuthProvider/AuthProvider.js.map +1 -1
- package/dist/jsx/provider/AuthProvider/AuthProvider.mjs +9 -5
- package/dist/jsx/provider/AuthProvider/AuthProvider.native.js +61 -74
- package/dist/jsx/provider/AuthProvider/AuthProvider.native.js.map +2 -2
- package/dist/jsx/provider/AuthProvider/index.native.js.map +1 -1
- package/dist/jsx/provider/KeycloakProvider.native.js.map +1 -1
- package/dist/jsx/provider/index.native.js.map +1 -1
- package/dist/jsx/routes.js +4 -6
- package/dist/jsx/routes.js.map +1 -1
- package/dist/jsx/routes.mjs +2 -2
- package/dist/jsx/routes.native.js +71 -81
- package/dist/jsx/routes.native.js.map +3 -3
- package/dist/jsx/session/index.native.js.map +1 -1
- package/dist/jsx/session/session.js +2 -13
- package/dist/jsx/session/session.js.map +2 -2
- package/dist/jsx/session/session.mjs +3 -12
- package/dist/jsx/session/session.native.js +53 -58
- package/dist/jsx/session/session.native.js.map +2 -2
- package/dist/jsx/state.native.js.map +1 -1
- package/dist/jsx/token.native.js.map +1 -1
- package/package.json +11 -13
- package/routes/index.d.ts +15 -15
- package/routes/index.js +15 -15
- package/src/@types/expoKeycloakAuth.d.ts +16 -16
- package/src/Authenticated.tsx +1 -2
- package/src/authConfig.ts +15 -15
- package/src/hooks/index.ts +15 -15
- package/src/hooks/useAuthConfig.ts +15 -15
- package/src/hooks/useTokensFromQuery/index.native.ts +15 -15
- package/src/hooks/useTokensFromQuery/index.ts +15 -15
- package/src/hooks/useTokensFromState.ts +15 -15
- package/src/index.ts +15 -15
- package/src/keycloak/config.ts +15 -15
- package/src/keycloak/context.ts +15 -15
- package/src/keycloak/index.ts +15 -15
- package/src/keycloak/keycloak.native.ts +15 -15
- package/src/keycloak/keycloak.ts +16 -36
- package/src/provider/AuthProvider/AuthProvider.tsx +7 -4
- package/src/provider/AuthProvider/index.ts +15 -15
- package/src/provider/index.ts +15 -15
- package/src/routes.ts +18 -21
- package/src/session/index.ts +15 -15
- package/src/session/session.native.ts +15 -15
- package/src/session/session.ts +18 -32
- package/src/state.ts +15 -15
- package/src/token.ts +15 -15
- package/src/types.ts +15 -15
- package/types/Authenticated.d.ts.map +1 -1
- package/types/keycloak/keycloak.d.ts +0 -2
- package/types/keycloak/keycloak.d.ts.map +1 -1
- package/types/provider/AuthProvider/AuthProvider.d.ts.map +1 -1
- package/types/routes.d.ts.map +1 -1
- package/types/session/session.d.ts +1 -2
- package/types/session/session.d.ts.map +1 -1
- package/dist/esm/hooks/useTokensFromQuery/index.native.mjs +0 -2
- package/dist/esm/keycloak/keycloak.native.mjs +0 -84
- package/dist/esm/provider/AuthProvider/AuthProvider.native.mjs +0 -111
- package/dist/esm/session/session.native.mjs +0 -7
- package/dist/jsx/hooks/useTokensFromQuery/index.native.mjs +0 -2
- package/dist/jsx/keycloak/keycloak.native.mjs +0 -84
- package/dist/jsx/provider/AuthProvider/AuthProvider.native.mjs +0 -111
- package/dist/jsx/session/session.native.mjs +0 -7
|
@@ -26,8 +26,7 @@ function _ts_generator(thisArg, body) {
|
|
|
26
26
|
var f, y, t, g, _ = {
|
|
27
27
|
label: 0,
|
|
28
28
|
sent: function() {
|
|
29
|
-
if (t[0] & 1)
|
|
30
|
-
throw t[1];
|
|
29
|
+
if (t[0] & 1) throw t[1];
|
|
31
30
|
return t[1];
|
|
32
31
|
},
|
|
33
32
|
trys: [],
|
|
@@ -49,64 +48,60 @@ function _ts_generator(thisArg, body) {
|
|
|
49
48
|
};
|
|
50
49
|
}
|
|
51
50
|
function step(op) {
|
|
52
|
-
if (f)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
default:
|
|
80
|
-
if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
81
|
-
_ = 0;
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
85
|
-
_.label = op[1];
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
89
|
-
_.label = t[1], t = op;
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
if (t && _.label < t[2]) {
|
|
93
|
-
_.label = t[2], _.ops.push(op);
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
t[2] && _.ops.pop(), _.trys.pop();
|
|
51
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
52
|
+
for (; _; ) try {
|
|
53
|
+
if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
54
|
+
switch (y = 0, t && (op = [
|
|
55
|
+
op[0] & 2,
|
|
56
|
+
t.value
|
|
57
|
+
]), op[0]) {
|
|
58
|
+
case 0:
|
|
59
|
+
case 1:
|
|
60
|
+
t = op;
|
|
61
|
+
break;
|
|
62
|
+
case 4:
|
|
63
|
+
return _.label++, {
|
|
64
|
+
value: op[1],
|
|
65
|
+
done: !1
|
|
66
|
+
};
|
|
67
|
+
case 5:
|
|
68
|
+
_.label++, y = op[1], op = [
|
|
69
|
+
0
|
|
70
|
+
];
|
|
71
|
+
continue;
|
|
72
|
+
case 7:
|
|
73
|
+
op = _.ops.pop(), _.trys.pop();
|
|
74
|
+
continue;
|
|
75
|
+
default:
|
|
76
|
+
if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
77
|
+
_ = 0;
|
|
97
78
|
continue;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
79
|
+
}
|
|
80
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
81
|
+
_.label = op[1];
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
85
|
+
_.label = t[1], t = op;
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
if (t && _.label < t[2]) {
|
|
89
|
+
_.label = t[2], _.ops.push(op);
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
t[2] && _.ops.pop(), _.trys.pop();
|
|
93
|
+
continue;
|
|
107
94
|
}
|
|
108
|
-
|
|
109
|
-
|
|
95
|
+
op = body.call(thisArg, _);
|
|
96
|
+
} catch (e) {
|
|
97
|
+
op = [
|
|
98
|
+
6,
|
|
99
|
+
e
|
|
100
|
+
], y = 0;
|
|
101
|
+
} finally {
|
|
102
|
+
f = t = 0;
|
|
103
|
+
}
|
|
104
|
+
if (op[0] & 5) throw op[1];
|
|
110
105
|
return {
|
|
111
106
|
value: op[0] ? op[1] : void 0,
|
|
112
107
|
done: !0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/session/
|
|
4
|
-
"mappings": "
|
|
3
|
+
"sources": ["../../../src/session/home/clayrisser/Projects/bitspur/multiplatform.one/multiplatform.one/packages/keycloak/src/session/session.native.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,SAAsBA,aAAAA;SAAAA,YAAAA,MAAAA,MAAAA,SAAAA;;SAAAA,cAAAA;AAAAA,uBAAf,oBAAA,WAAA;;AACL,aAAA;;QAAO;;;EACT,CAAA,GAFsBA,YAAAA,MAAAA,MAAAA,SAAAA;;AAIf,SAASC,WAA8BC,UAA+B;AAC3E,SAAO,CAAC;AACV;",
|
|
5
5
|
"names": ["getSession", "useSession", "_options"]
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/
|
|
3
|
+
"sources": ["../../src/home/clayrisser/Projects/bitspur/multiplatform.one/multiplatform.one/packages/keycloak/src/state.ts"],
|
|
4
4
|
"mappings": "AAqBA,SAASA,qBAAqB;AAC9B,SAASC,wBAAwB;AAE1B,IAAMC,UAAUF,cAAcG,YAAa,CAACH,cAAcI,UAAU,CAACJ,cAAcK,UAElFC,WAAaL,iBACnB,QACA;EACEM,SAAS;EACTC,cAAc;EACdC,OAAO;AACT,GACAC,QACA;EAAER;AAAQ,CAAA,EARJI;AAWD,SAASK,eAAAA;AACd,SAAOL,SAAAA;AACT;",
|
|
5
5
|
"names": ["MultiPlatform", "createStateStore", "persist", "isIframe", "isNext", "isServer", "useStore", "idToken", "refreshToken", "token", "undefined", "useAuthState"]
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/
|
|
3
|
+
"sources": ["../../src/home/clayrisser/Projects/bitspur/multiplatform.one/multiplatform.one/packages/keycloak/src/token.ts"],
|
|
4
4
|
"mappings": "AAsBA,SAASA,iBAAiB;AAUnB,SAASC,wBAAwBC,OAA0BC,cAA+B;AAC/F,MAAI,SAAOD,QAAU;AACrB,WAAKA,QACD,OAAOA,SAAU,WAAiBA,QAClCC,eACEA,iBAAiB,MAAQ,CAACC,eAAeD,YAAAA,IAAsBD,QAC5D,KAEFE,eAAeF,KAAAA,IAAS,KAAQA,QANpB;AAOrB;AAEO,SAASE,eAAeF,OAAa;AAC1C,MAAQG,MAAQL,UAAUE,KAAAA,EAAlBG;AACR,SAAKA,MACEC,KAAKC,MAAMC,KAAKC,IAAG,IAAK,GAAA,KAASJ,MADvB;AAEnB;",
|
|
5
5
|
"names": ["jwtDecode", "validOrRefreshableToken", "token", "refreshToken", "isTokenExpired", "exp", "Math", "floor", "Date", "now"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/keycloak",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "keycloak client for multiplatform.one ecosystem",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -44,27 +44,25 @@
|
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@react-native-async-storage/async-storage": "1.21.0",
|
|
47
|
-
"multiplatform.one": "1.0.
|
|
47
|
+
"multiplatform.one": "1.0.13",
|
|
48
48
|
"next": "^13.0.5",
|
|
49
49
|
"react": "18.2.0",
|
|
50
|
-
"react-native": "0.74.
|
|
50
|
+
"react-native": "0.74.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@react-native-async-storage/async-storage": "1.23.1",
|
|
54
|
-
"@tamagui/build": "^1.
|
|
55
|
-
"@testing-library/jest-dom": "^6.4.
|
|
54
|
+
"@tamagui/build": "^1.100.3",
|
|
55
|
+
"@testing-library/jest-dom": "^6.4.6",
|
|
56
56
|
"@testing-library/react": "^15.0.7",
|
|
57
|
-
"@types/jest": "^29.5.12",
|
|
58
57
|
"@types/lodash.camelcase": "^4.3.9",
|
|
59
58
|
"@types/lodash.startcase": "^4.4.9",
|
|
60
59
|
"@types/react": "^18.3.1",
|
|
61
60
|
"@types/react-native": "^0.73.0",
|
|
62
|
-
"@vitejs/plugin-react": "^4.3.
|
|
63
|
-
"
|
|
64
|
-
"multiplatform.one": "1.0.11",
|
|
61
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
62
|
+
"multiplatform.one": "1.0.13",
|
|
65
63
|
"next": "^14.2.3",
|
|
66
64
|
"react": "18.2.0",
|
|
67
|
-
"react-native": "0.74.
|
|
65
|
+
"react-native": "0.74.2",
|
|
68
66
|
"typescript": "~5.3.3",
|
|
69
67
|
"vitest": "^1.6.0",
|
|
70
68
|
"vitest-react-native": "^0.1.5"
|
|
@@ -76,11 +74,11 @@
|
|
|
76
74
|
"lib"
|
|
77
75
|
],
|
|
78
76
|
"dependencies": {
|
|
79
|
-
"@
|
|
80
|
-
"@multiplatform.one/zustand": "1.0.3",
|
|
77
|
+
"@multiplatform.one/zustand": "1.0.5",
|
|
81
78
|
"expo-auth-session": "^5.5.2",
|
|
82
79
|
"expo-crypto": "^13.0.2",
|
|
83
|
-
"
|
|
80
|
+
"jwt-decode": "^4.0.0",
|
|
81
|
+
"keycloak-js": "^24.0.5",
|
|
84
82
|
"next-auth": "^4.24.7"
|
|
85
83
|
},
|
|
86
84
|
"scripts": {
|
package/routes/index.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* File: /routes/index.d.ts
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 04-04-2024 15:50:39
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
export * from '../types/routes';
|
package/routes/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* File: /routes/index.js
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 04-04-2024 15:50:39
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
module.exports = require('../dist/cjs/routes.js');
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* File: /src/@types/expoKeycloakAuth.d.ts
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 04-04-2024 15:50:39
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
declare module 'expo-keycloak-auth' {
|
|
23
|
-
export function useKeycloak(): any;
|
|
24
23
|
export const KeycloakProvider: any;
|
|
24
|
+
export function useKeycloak(): any;
|
|
25
25
|
}
|
package/src/Authenticated.tsx
CHANGED
|
@@ -21,14 +21,13 @@
|
|
|
21
21
|
|
|
22
22
|
'use client';
|
|
23
23
|
|
|
24
|
+
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
24
25
|
import React, { ComponentType, PropsWithChildren, useEffect } from 'react';
|
|
25
26
|
import { MultiPlatform } from 'multiplatform.one';
|
|
26
27
|
import { Text } from 'tamagui';
|
|
27
28
|
import { useAuthConfig, useTokensFromQuery } from './hooks';
|
|
28
29
|
import { useKeycloak } from './keycloak';
|
|
29
30
|
|
|
30
|
-
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
31
|
-
|
|
32
31
|
global.AsyncStorage = AsyncStorage;
|
|
33
32
|
|
|
34
33
|
export interface AuthenticatedProps extends PropsWithChildren {
|
package/src/authConfig.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* File: /src/authConfig.ts
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 04-04-2024 15:50:39
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
'use client';
|
package/src/hooks/index.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* File: /src/hooks/index.ts
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 04-04-2024 15:50:39
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
export * from './useAuthConfig';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* File: /src/hooks/useAuthConfig.ts
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 04-04-2024 15:50:39
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
import { useContext } from 'react';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* File: /src/hooks/useTokensFromQuery/index.native.ts
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 04-04-2024 15:50:39
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
export const useTokensFromQuery = () => false;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* File: /src/hooks/useTokensFromQuery/index.ts
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 04-04-2024 15:50:39
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
'use client';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* File: /src/hooks/useTokensFromState.ts
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 04-04-2024 15:50:39
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
import { useAuthState } from '../state';
|
package/src/index.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
2
|
+
* File: /src/index.ts
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 01-06-2024 13:44:49
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
export * from './Authenticated';
|