File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/nextjs/src/server/actions Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 2020
2121import { cookies } from 'next/headers' ;
2222import {
23- CookieConfig ,
2423 generateSessionId ,
2524 EmbeddedSignInFlowStatus ,
2625 EmbeddedSignInFlowHandleRequestPayload ,
2726 EmbeddedFlowExecuteRequestConfig ,
2827 EmbeddedSignInFlowInitiateResponse ,
28+ isEmpty ,
2929} from '@asgardeo/node' ;
3030import AsgardeoNextClient from '../../AsgardeoNextClient' ;
3131import SessionManager from '../../utils/SessionManager' ;
@@ -96,7 +96,7 @@ const signInAction = async (
9696 }
9797
9898 // If no payload provided, redirect to sign-in URL for redirect-based sign-in.
99- if ( ! payload ) {
99+ if ( ! payload || isEmpty ( payload ) ) {
100100 const defaultSignInUrl = await client . getAuthorizeRequestUrl ( { } , sessionId ) ;
101101 return { success : true , data : { signInUrl : String ( defaultSignInUrl ) } } ;
102102 }
You can’t perform that action at this time.
0 commit comments