File tree Expand file tree Collapse file tree
packages/nextjs/src/server/actions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ const handleOAuthCallbackAction = async (
9999 sessionId ,
100100 ) ;
101101
102- const config : AsgardeoNextConfig = await ( asgardeoClient . getConfiguration ( ) as unknown as Promise < AsgardeoNextConfig > ) ;
102+ const config : AsgardeoNextConfig = await asgardeoClient . getConfiguration ( ) ;
103103
104104 if ( signInResult ) {
105105 try {
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ const refreshToken = async (): Promise<RefreshResult> => {
6969
7070 const sessionPayload : SessionTokenPayload = await SessionManager . verifySessionTokenForRefresh ( sessionToken ) ;
7171 const client : AsgardeoNextClient = AsgardeoNextClient . getInstance ( ) ;
72- const config : AsgardeoNextConfig = await ( client . getConfiguration ( ) as unknown as Promise < AsgardeoNextConfig > ) ;
72+ const config : AsgardeoNextConfig = await client . getConfiguration ( ) ;
7373
7474 const result : HandleRefreshTokenResult = await handleRefreshToken ( sessionPayload , {
7575 baseUrl : config . baseUrl ?? '' ,
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ const signInAction = async (
131131 | string
132132 | undefined ;
133133 const expiresIn : number = signInResult [ 'expiresIn' ] as number ;
134- const config : AsgardeoNextConfig = await ( client . getConfiguration ( ) as unknown as Promise < AsgardeoNextConfig > ) ;
134+ const config : AsgardeoNextConfig = await client . getConfiguration ( ) ;
135135 const sessionCookieExpiryTime : number = SessionManager . resolveSessionCookieExpiry ( config . sessionCookieExpiryTime ) ;
136136
137137 const sessionToken : string = await SessionManager . createSessionToken (
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const switchOrganization = async (
5151 const organizationId : string | undefined = ( idToken [ 'user_org' ] || idToken [ 'organization_id' ] ) as
5252 | string
5353 | undefined ;
54- const config : AsgardeoNextConfig = await ( client . getConfiguration ( ) as unknown as Promise < AsgardeoNextConfig > ) ;
54+ const config : AsgardeoNextConfig = await client . getConfiguration ( ) ;
5555 const sessionCookieExpiryTime : number = SessionManager . resolveSessionCookieExpiry ( config . sessionCookieExpiryTime ) ;
5656 const expiresIn : number = parseInt ( tokenResponse . expiresIn , 10 ) ;
5757
You can’t perform that action at this time.
0 commit comments