File tree Expand file tree Collapse file tree 1 file changed +16
-19
lines changed
packages/thirdweb/src/wallets/in-app/core/authentication Expand file tree Collapse file tree 1 file changed +16
-19
lines changed Original file line number Diff line number Diff line change @@ -29,25 +29,22 @@ export async function guestAuthenticate(args: {
2929 }
3030
3131 const clientFetch = getClientFetch ( args . client , args . ecosystem ) ;
32- const authResult = await ( async ( ) => {
33- const path = getLoginCallbackUrl ( {
34- authOption : "guest" ,
35- client : args . client ,
36- ecosystem : args . ecosystem ,
37- } ) ;
38- const res = await clientFetch ( `${ path } ` , {
39- method : "POST" ,
40- headers : {
41- "Content-Type" : "application/json" ,
42- } ,
43- body : JSON . stringify ( {
44- sessionId,
45- } ) ,
46- } ) ;
32+ const path = getLoginCallbackUrl ( {
33+ authOption : "guest" ,
34+ client : args . client ,
35+ ecosystem : args . ecosystem ,
36+ } ) ;
37+ const res = await clientFetch ( `${ path } ` , {
38+ method : "POST" ,
39+ headers : {
40+ "Content-Type" : "application/json" ,
41+ } ,
42+ body : JSON . stringify ( {
43+ sessionId,
44+ } ) ,
45+ } ) ;
4746
48- if ( ! res . ok ) throw new Error ( "Failed to generate guest account" ) ;
47+ if ( ! res . ok ) throw new Error ( "Failed to generate guest account" ) ;
4948
50- return ( await res . json ( ) ) satisfies AuthStoredTokenWithCookieReturnType ;
51- } ) ( ) ;
52- return authResult ;
49+ return ( await res . json ( ) ) satisfies AuthStoredTokenWithCookieReturnType ;
5350}
You can’t perform that action at this time.
0 commit comments