Skip to content

Commit 17700eb

Browse files
committed
chore: remove console.log statements for cleaner code
1 parent 5cb9da5 commit 17700eb

File tree

12 files changed

+2
-27
lines changed

12 files changed

+2
-27
lines changed

packages/javascript/src/IsomorphicCrypto.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ export class IsomorphicCrypto<T = any> {
138138
*/
139139
public decodeIdToken(idToken: string): IdToken {
140140
try {
141-
console.log('[IsomorphicCrypto] Decoding ID token:', idToken);
142141
const utf8String: string = this._cryptoUtils.base64URLDecode(idToken?.split('.')[1]);
143142
const payload: IdToken = JSON.parse(utf8String);
144143

packages/javascript/src/__legacy__/client.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,6 @@ export class AsgardeoAuthClient<T> {
361361

362362
let tokenResponse: Response;
363363

364-
console.log('[AsgardeoAuthClient] Requesting access token from:', tokenEndpoint);
365-
366364
try {
367365
tokenResponse = await fetch(tokenEndpoint, {
368366
body: body,
@@ -634,9 +632,7 @@ export class AsgardeoAuthClient<T> {
634632
* @preserve
635633
*/
636634
public async getUser(userId?: string): Promise<User> {
637-
console.log('[AsgardeoAuthClient] Getting user with userId:', userId);
638635
const sessionData: SessionData = await this._storageManager.getSessionData(userId);
639-
console.log('[AsgardeoAuthClient] Session data:', sessionData);
640636
const authenticatedUser: User = this._authenticationHelper.getAuthenticatedUserInfo(sessionData?.id_token);
641637

642638
Object.keys(authenticatedUser).forEach((key: string) => {

packages/javascript/src/__legacy__/helpers/authentication-helper.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ export class AuthenticationHelper<T> {
288288

289289
await this._storageManager.setSessionData(parsedResponse, userId);
290290

291-
console.log('[AuthenticationHelper] Token response handled successfully:', userId, tokenResponse);
292291
return Promise.resolve(tokenResponse);
293292
}
294293
}

packages/javascript/src/api/initializeEmbeddedSignInFlow.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ const initializeEmbeddedSignInFlow = async ({
7373
}
7474
});
7575

76-
console.log('Executing embedded sign-in flow with payload:', url, searchParams.toString());
77-
7876
const {headers: customHeaders, ...otherConfig} = requestConfig;
7977
const response: Response = await fetch(url ?? `${baseUrl}/oauth2/authorize`, {
8078
method: requestConfig.method || 'POST',

packages/nextjs/src/AsgardeoNextClient.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,6 @@ class AsgardeoNextClient<T extends AsgardeoNextConfig = AsgardeoNextConfig> exte
260260
}),
261261
);
262262

263-
console.log('[AsgardeoNextClient] Redirecting to sign-in URL:', defaultSignInUrl);
264-
265263
return initializeEmbeddedSignInFlow({
266264
url: `${defaultSignInUrl.origin}${defaultSignInUrl.pathname}`,
267265
payload: Object.fromEntries(defaultSignInUrl.searchParams.entries()),

packages/nextjs/src/client/components/presentation/UserProfile/UserProfile.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ const UserProfile: FC<UserProfileProps> = ({...rest}: UserProfileProps): ReactEl
5959
const {profile, flattenedProfile, schemas, revalidateProfile} = useUser();
6060

6161
const handleProfileUpdate = async (payload: any): Promise<void> => {
62-
console.log('[UserProfile] handleProfileUpdate', baseUrl);
6362
await updateUserProfileAction(payload, (await getSessionId()) as string);
6463
await revalidateProfile();
6564
};

packages/nextjs/src/client/contexts/Asgardeo/AsgardeoProvider.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,10 @@ const AsgardeoClientProvider: FC<PropsWithChildren<AsgardeoClientProviderProps>>
8787

8888
// Handle OAuth callback if code and state are present
8989
if (code && state) {
90-
console.log('[AsgardeoClientProvider] Handling OAuth callback');
9190
setIsLoading(true);
92-
91+
9392
const result = await handleOAuthCallback(code, state, sessionState || undefined);
94-
93+
9594
if (result.success) {
9695
// Redirect to the success URL
9796
if (result.redirectUrl) {
@@ -101,7 +100,6 @@ const AsgardeoClientProvider: FC<PropsWithChildren<AsgardeoClientProviderProps>>
101100
window.location.reload();
102101
}
103102
} else {
104-
console.error('[AsgardeoClientProvider] OAuth callback failed:', result.error);
105103
router.push(`/signin?error=authentication_failed&error_description=${encodeURIComponent(result.error || 'Authentication failed')}`);
106104
}
107105
}
@@ -162,7 +160,6 @@ const AsgardeoClientProvider: FC<PropsWithChildren<AsgardeoClientProviderProps>>
162160
payload: EmbeddedFlowExecuteRequestPayload,
163161
request: EmbeddedFlowExecuteRequestConfig,
164162
) => {
165-
console.log('[AsgardeoClientProvider] Executing sign-up action with payload', payload);
166163
try {
167164
const result = await signUp(payload, request);
168165

packages/nextjs/src/server/AsgardeoProvider.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ const AsgardeoServerProvider: FC<PropsWithChildren<AsgardeoServerProviderProps>>
6161
}: PropsWithChildren<AsgardeoServerProviderProps>): Promise<ReactElement> => {
6262
const asgardeoClient = AsgardeoNextClient.getInstance();
6363
let config: Partial<AsgardeoNextConfig> = {};
64-
console.log('Initializing Asgardeo client with config:', config);
6564

6665
try {
6766
await asgardeoClient.initialize(_config);

packages/nextjs/src/server/actions/signUpAction.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ const signUpAction = async (
5050
try {
5151
const client = AsgardeoNextClient.getInstance();
5252

53-
console.log('Executing sign-up action with payload:', payload);
54-
5553
// If no payload provided, redirect to sign-in URL for redirect-based sign-in.
5654
// If there's a payload, handle the embedded sign-in flow.
5755
if (!payload) {

packages/node/src/__legacy__/client.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ export class AsgardeoNodeClient<T> {
202202
*
203203
*/
204204
public async getUser(userId: string): Promise<User> {
205-
console.log('[LegacyAsgardeoNodeClient] Getting user with userId:', this._authCore);
206205
return this._authCore.getUser(userId);
207206
}
208207

0 commit comments

Comments
 (0)