@@ -20,9 +20,9 @@ export const { handlers, auth } = NextAuth({
2020 providers: [
2121 Google ({
2222 profile(profile ) {
23- return { role: profile .role ?? " user" , ... }
23+ return { role: profile .role ?? " user" , ... profile }
2424 },
25- })
25+ }),
2626 ],
2727})
2828```
@@ -39,7 +39,7 @@ export const { onRequest, useSession, useSignIn, useSignOut } = QwikAuth$(
3939 providers: [
4040 Google ({
4141 profile(profile ) {
42- return { role: profile .role ?? " user" , ... }
42+ return { role: profile .role ?? " user" , ... profile }
4343 },
4444 })
4545 ],
@@ -58,9 +58,9 @@ export const { handle } = SvelteKitAuth({
5858 providers: [
5959 Google ({
6060 profile(profile ) {
61- return { role: profile .role ?? " user" , ... }
61+ return { role: profile .role ?? " user" , ... profile }
6262 },
63- })
63+ }),
6464 ],
6565})
6666```
@@ -94,20 +94,20 @@ export const { handlers, auth } = NextAuth({
9494 providers: [
9595 Google ({
9696 profile(profile ) {
97- return { role: profile .role ?? " user" , ... }
97+ return { role: profile .role ?? " user" , ... profile }
9898 },
99- })
99+ }),
100100 ],
101101 callbacks: {
102102 jwt({ token , user }) {
103- if (user ) token .role = user .role
103+ if (user ) token .role = user .role
104104 return token
105105 },
106106 session({ session , token }) {
107107 session .user .role = token .role
108108 return session
109- }
110- }
109+ },
110+ },
111111})
112112```
113113
@@ -123,7 +123,7 @@ export const { onRequest, useSession, useSignIn, useSignOut } = QwikAuth$(
123123 providers: [
124124 Google ({
125125 profile(profile ) {
126- return { role: profile .role ?? " user" , ... }
126+ return { role: profile .role ?? " user" , ... profile }
127127 },
128128 })
129129 ],
@@ -152,20 +152,20 @@ export const { handle } = SvelteKitAuth({
152152 providers: [
153153 Google ({
154154 profile(profile ) {
155- return { role: profile .role ?? " user" , ... }
155+ return { role: profile .role ?? " user" , ... profile }
156156 },
157- })
157+ }),
158158 ],
159159 callbacks: {
160160 jwt({ token , user }) {
161- if (user ) token .role = user .role
161+ if (user ) token .role = user .role
162162 return token
163163 },
164164 session({ session , token }) {
165165 session .user .role = token .role
166166 return session
167- }
168- }
167+ },
168+ },
169169})
170170```
171171
@@ -213,16 +213,16 @@ export const { handlers, auth } = NextAuth({
213213 providers: [
214214 Google ({
215215 profile(profile ) {
216- return { role: profile .role ?? " user" , ... }
217- }
218- })
216+ return { role: profile .role ?? " user" , ... profile }
217+ },
218+ }),
219219 ],
220220 callbacks: {
221221 session({ session , user }) {
222222 session .user .role = user .role
223223 return session
224- }
225- }
224+ },
225+ },
226226})
227227```
228228
@@ -263,17 +263,16 @@ export const { handle, auth } = SvelteKitAuth({
263263 providers: [
264264 Google ({
265265 profile(profile ) {
266- return { role: profile .role ?? " user" , ... }
267- }
268- ...
269- })
266+ return { role: profile .role ?? " user" , ... profile }
267+ },
268+ }),
270269 ],
271270 callbacks: {
272271 session({ session , user }) {
273272 session .user .role = user .role
274273 return session
275- }
276- }
274+ },
275+ },
277276})
278277```
279278
0 commit comments