@@ -29,11 +29,12 @@ import getSessionId from './actions/getSessionId';
2929import getUserProfileAction from './actions/getUserProfileAction' ;
3030import signUpAction from './actions/signUpAction' ;
3131import handleOAuthCallbackAction from './actions/handleOAuthCallbackAction' ;
32+ import { AsgardeoProviderProps } from '@asgardeo/react' ;
3233
3334/**
3435 * Props interface of {@link AsgardeoServerProvider}
3536 */
36- export type AsgardeoServerProviderProps = AsgardeoClientProviderProps & {
37+ export type AsgardeoServerProviderProps = Partial < AsgardeoProviderProps > & {
3738 clientSecret ?: string ;
3839} ;
3940
@@ -63,7 +64,7 @@ const AsgardeoServerProvider: FC<PropsWithChildren<AsgardeoServerProviderProps>>
6364 let config : Partial < AsgardeoNextConfig > = { } ;
6465
6566 try {
66- await asgardeoClient . initialize ( _config ) ;
67+ await asgardeoClient . initialize ( _config as AsgardeoNextConfig ) ;
6768 config = await asgardeoClient . getConfiguration ( ) ;
6869 } catch ( error ) {
6970 throw new AsgardeoRuntimeError (
@@ -78,7 +79,7 @@ const AsgardeoServerProvider: FC<PropsWithChildren<AsgardeoServerProviderProps>>
7879 return < > </ > ;
7980 }
8081
81- const sessionId : string = await getSessionId ( ) as string ;
82+ const sessionId : string = ( await getSessionId ( ) ) as string ;
8283 const _isSignedIn : boolean = await isSignedIn ( sessionId ) ;
8384
8485 let user : User = { } ;
@@ -89,8 +90,8 @@ const AsgardeoServerProvider: FC<PropsWithChildren<AsgardeoServerProviderProps>>
8990 } ;
9091
9192 if ( _isSignedIn ) {
92- const userResponse = await getUserAction ( ( sessionId ) ) ;
93- const userProfileResponse = await getUserProfileAction ( ( sessionId ) ) ;
93+ const userResponse = await getUserAction ( sessionId ) ;
94+ const userProfileResponse = await getUserProfileAction ( sessionId ) ;
9495
9596 user = userResponse . data ?. user || { } ;
9697 userProfile = userProfileResponse . data ?. userProfile ;
0 commit comments