@zitadel/sdk-nuxt 1.0.0-alpha.20 → 1.0.0-alpha.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
CHANGED
|
@@ -71,7 +71,7 @@ const auth = useAuth();
|
|
|
71
71
|
</script>
|
|
72
72
|
|
|
73
73
|
<template>
|
|
74
|
-
<p>{{ auth.isAuthenticated ? auth.session.
|
|
74
|
+
<p>{{ auth.isAuthenticated ? (auth.session.display ?? auth.session.identifier) : 'Not signed in' }}</p>
|
|
75
75
|
</template>
|
|
76
76
|
```
|
|
77
77
|
|
|
@@ -153,7 +153,12 @@ async function validateOpaqueSessionToken(token, issuerUrl, timeoutMs) {
|
|
|
153
153
|
});
|
|
154
154
|
if (!res.ok) return null;
|
|
155
155
|
const body = await res.json();
|
|
156
|
-
return {
|
|
156
|
+
return {
|
|
157
|
+
userId: body.user_id,
|
|
158
|
+
identifier: body.user?.identifier ?? null,
|
|
159
|
+
identifierProperty: body.user?.identifier_property ?? null,
|
|
160
|
+
display: body.user?.display ?? null
|
|
161
|
+
};
|
|
157
162
|
} catch {
|
|
158
163
|
return null;
|
|
159
164
|
}
|
|
@@ -189,8 +194,9 @@ async function handleAuth(event, opts) {
|
|
|
189
194
|
isAuthenticated: true,
|
|
190
195
|
session: {
|
|
191
196
|
userId: payload.sub,
|
|
192
|
-
|
|
193
|
-
|
|
197
|
+
identifier: payload.email ?? null,
|
|
198
|
+
identifierProperty: null,
|
|
199
|
+
display: payload.name ?? null,
|
|
194
200
|
token
|
|
195
201
|
}
|
|
196
202
|
};
|
|
@@ -204,8 +210,9 @@ async function handleAuth(event, opts) {
|
|
|
204
210
|
isAuthenticated: true,
|
|
205
211
|
session: {
|
|
206
212
|
userId: opaqueResult.userId,
|
|
207
|
-
|
|
208
|
-
|
|
213
|
+
identifier: opaqueResult.identifier,
|
|
214
|
+
identifierProperty: opaqueResult.identifierProperty,
|
|
215
|
+
display: opaqueResult.display,
|
|
209
216
|
token: cookieToken
|
|
210
217
|
}
|
|
211
218
|
};
|
package/dist/index.js
CHANGED
package/dist/runtime/plugin.js
CHANGED
|
@@ -11,8 +11,9 @@ var plugin_default = defineNuxtPlugin(() => {
|
|
|
11
11
|
isAuthenticated: true,
|
|
12
12
|
session: {
|
|
13
13
|
userId: auth.session.userId,
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
identifier: auth.session.identifier,
|
|
15
|
+
identifierProperty: auth.session.identifierProperty,
|
|
16
|
+
display: auth.session.display
|
|
16
17
|
}
|
|
17
18
|
} : { isAuthenticated: false, session: null };
|
|
18
19
|
useState("nextgen-auth", () => clientAuth);
|
package/dist/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zitadel/sdk-nuxt",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.21",
|
|
4
4
|
"description": "Nuxt proxy middleware and helpers for the pre-release Zitadel preview.",
|
|
5
5
|
"homepage": "https://github.com/zitadel/nextgen/tree/main/packages/sdk-nuxt#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@zitadel/
|
|
37
|
-
"@zitadel/sdk-core": "1.0.0-alpha.
|
|
38
|
-
"@zitadel/
|
|
36
|
+
"@zitadel/api": "1.0.0-alpha.21",
|
|
37
|
+
"@zitadel/sdk-core": "1.0.0-alpha.21",
|
|
38
|
+
"@zitadel/components": "1.0.0-alpha.21"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"h3": ">=1",
|