Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/expo-log-prefix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export function useUserProfileCustomPages(
openingPaths.current.add(path);
void Linking.openURL(page.href)
.catch(error => {
console.warn(`Could not open custom user profile page "${path}".`, error);
console.warn(`Clerk: Could not open custom user profile page "${path}".`, error);
})
.finally(() => {
openingPaths.current.delete(path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ describe('UserProfileView', () => {
});

await waitFor(() => {
expect(warn).toHaveBeenCalledWith('Could not open custom user profile page "docs".', error);
expect(warn).toHaveBeenCalledWith('Clerk: Could not open custom user profile page "docs".', error);
expect(mocks.navigateCustomPage).toHaveBeenCalledWith('back');
});

Expand Down
2 changes: 1 addition & 1 deletion packages/expo/src/hooks/useHostedAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function warnAndroidDefaultRedirectOnce(): void {
if (__DEV__ && !hasWarnedAndroidDefaultRedirect) {
hasWarnedAndroidDefaultRedirect = true;
console.warn(
'[useHostedAuth] The default Android redirect URL relies on the `clerk://<package>.hosted-callback` intent ' +
'Clerk: The default Android redirect URL relies on the `clerk://<package>.hosted-callback` intent ' +
'filter registered by the Clerk Expo config plugin. If the plugin is not enabled in app.json or the ' +
'native project has not been rebuilt since (e.g. `npx expo prebuild`), the browser cannot redirect ' +
'back to the app and hosted auth will hang. Alternatively, pass a custom `redirectUrl` handled by the app.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ describe('useAuthViewState', () => {
await waitFor(() => {
expect(result.current).toEqual({ isLoaded: true, isAuthFlowComplete: true });
});
expect(consoleError).toHaveBeenCalledWith('[useAuthViewState] Failed to get native auth-flow state:', error);
expect(consoleError).toHaveBeenCalledWith('Clerk: Failed to get native auth-flow state:', error);
});

test('falls back to JS session state when the native listener cannot be installed', async () => {
Expand All @@ -167,6 +167,6 @@ describe('useAuthViewState', () => {
await waitFor(() => {
expect(result.current).toEqual({ isLoaded: true, isAuthFlowComplete: true });
});
expect(consoleError).toHaveBeenCalledWith('[useAuthViewState] Failed to observe native auth-flow state:', error);
expect(consoleError).toHaveBeenCalledWith('Clerk: Failed to observe native auth-flow state:', error);
});
});
4 changes: 2 additions & 2 deletions packages/expo/src/native-components/useAuthViewState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ export function useAuthViewState(): UseAuthViewStateReturn {

setUseJsFallback(true);
if (__DEV__) {
console.error('[useAuthViewState] Failed to get native auth-flow state:', error);
console.error('Clerk: Failed to get native auth-flow state:', error);
}
});
} catch (error) {
setUseJsFallback(true);
if (__DEV__) {
console.error('[useAuthViewState] Failed to observe native auth-flow state:', error);
console.error('Clerk: Failed to observe native auth-flow state:', error);
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/expo/src/provider/maybeCompleteAuthSession.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function maybeCompleteAuthSession(): void {
WebBrowser.maybeCompleteAuthSession();
} catch (e) {
if (__DEV__) {
console.warn('[ClerkProvider] expo-web-browser not available, OAuth/SSO on web will not work:', e);
console.warn('Clerk: expo-web-browser not available, OAuth/SSO on web will not work:', e);
}
}
}
2 changes: 1 addition & 1 deletion packages/expo/src/provider/nativeClientSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ let activeEngine: Engine | null = null;

function warn(message: string, error?: unknown): void {
if (__DEV__) {
console.warn(`[ClerkExpo] ${message}`, error);
console.warn(`Clerk: ${message}`, error);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export function createClerkInstance(ClerkClass: typeof Clerk) {

if (__DEV__ && !nativeApiErrorShown && response.payload?.errors?.[0]?.code === 'native_api_disabled') {
console.error(
'The Native API is disabled for this instance.\nGo to Clerk Dashboard > Configure > Native applications to enable it.\nOr, navigate here: https://dashboard.clerk.com/~/native-applications',
'Clerk: The Native API is disabled for this instance.\nGo to Clerk Dashboard > Configure > Native applications to enable it.\nOr, navigate here: https://dashboard.clerk.com/~/native-applications',
);
nativeApiErrorShown = true;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/expo/src/utils/native-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function loadNativeModule(): ClerkExpoNativeModule | null {
nativeModule = NativeClerkModule;
} catch (e) {
if (__DEV__) {
console.warn('[ClerkExpo] Native module not available:', e);
console.warn('Clerk: Native module not available:', e);
}
}

Expand All @@ -44,7 +44,7 @@ function loadNativeModule(): ClerkExpoNativeModule | null {

if (__DEV__ && nativeModule) {
console.error(
'[ClerkExpo] The native Clerk module in this app binary is incompatible with this version of @clerk/expo, so native components are disabled. ' +
'Clerk: The native Clerk module in this app binary is incompatible with this version of @clerk/expo, so native components are disabled. ' +
'Install the @clerk/expo-native-components version required by @clerk/expo, then rebuild the app.',
);
}
Expand Down
Loading