1818
1919'use server' ;
2020
21- import { BrandingPreference , AsgardeoRuntimeError , IdToken , Organization , User , UserProfile } from '@asgardeo/node' ;
22- import { AsgardeoProviderProps } from '@asgardeo/react' ;
23- import { FC , PropsWithChildren , ReactElement } from 'react' ;
21+ import { BrandingPreference , AsgardeoRuntimeError , IdToken , Organization , User , UserProfile } from '@asgardeo/node' ;
22+ import { AsgardeoProviderProps } from '@asgardeo/react' ;
23+ import { FC , PropsWithChildren , ReactElement } from 'react' ;
2424import clearSession from './actions/clearSession' ;
2525import createOrganization from './actions/createOrganization' ;
2626import getAllOrganizations from './actions/getAllOrganizations' ;
@@ -41,9 +41,9 @@ import switchOrganization from './actions/switchOrganization';
4141import updateUserProfileAction from './actions/updateUserProfileAction' ;
4242import AsgardeoNextClient from '../AsgardeoNextClient' ;
4343import AsgardeoClientProvider from '../client/contexts/Asgardeo/AsgardeoProvider.js' ;
44- import { AsgardeoNextConfig } from '../models/config' ;
44+ import { AsgardeoNextConfig } from '../models/config' ;
4545import logger from '../utils/logger' ;
46- import { SessionTokenPayload } from '../utils/SessionManager' ;
46+ import { SessionTokenPayload } from '../utils/SessionManager' ;
4747
4848/**
4949 * Props interface of {@link AsgardeoServerProvider}
@@ -136,13 +136,13 @@ const AsgardeoServerProvider: FC<PropsWithChildren<AsgardeoServerProviderProps>>
136136
137137 if ( sessionPayload ?. organizationId ) {
138138 updatedBaseUrl = `${ config ?. baseUrl } /o` ;
139- config = { ...config , baseUrl : updatedBaseUrl } ;
139+ config = { ...config , baseUrl : updatedBaseUrl } ;
140140 } else if ( sessionId ) {
141141 try {
142142 const idToken : IdToken = await asgardeoClient . getDecodedIdToken ( sessionId ) ;
143143 if ( idToken ?. [ 'user_org' ] ) {
144144 updatedBaseUrl = `${ config ?. baseUrl } /o` ;
145- config = { ...config , baseUrl : updatedBaseUrl } ;
145+ config = { ...config , baseUrl : updatedBaseUrl } ;
146146 }
147147 } catch {
148148 // Continue without organization info
@@ -157,12 +157,12 @@ const AsgardeoServerProvider: FC<PropsWithChildren<AsgardeoServerProviderProps>>
157157 if ( shouldFetchUserProfile ) {
158158 try {
159159 const userResponse : {
160- data : { user : User | null } ;
160+ data : { user : User | null } ;
161161 error : string | null ;
162162 success : boolean ;
163163 } = await getUserAction ( sessionId ) ;
164164 const userProfileResponse : {
165- data : { userProfile : UserProfile } ;
165+ data : { userProfile : UserProfile } ;
166166 error : string | null ;
167167 success : boolean ;
168168 } = await getUserProfileAction ( sessionId ) ;
@@ -177,7 +177,7 @@ const AsgardeoServerProvider: FC<PropsWithChildren<AsgardeoServerProviderProps>>
177177 if ( shouldFetchOrganizations ) {
178178 try {
179179 const currentOrganizationResponse : {
180- data : { organization ?: Organization ; user ?: Record < string , unknown > } ;
180+ data : { organization ?: Organization ; user ?: Record < string , unknown > } ;
181181 error : string | null ;
182182 success : boolean ;
183183 } = await getCurrentOrganizationAction ( sessionId ) ;
0 commit comments