This commit is contained in:
Leendert de Borst
2025-11-18 21:55:15 +01:00
parent c404fa807f
commit e4614c8034
8 changed files with 3 additions and 15 deletions

View File

@@ -48,7 +48,6 @@ export const NavigationProvider: React.FC<{ children: React.ReactNode }> = ({ ch
'/',
'/reinitialize',
'/login',
'/mobile-login',
'/unlock',
'/unlock-success',
'/auth-settings',

View File

@@ -33,7 +33,6 @@ export default function MobileUnlockConfirmScreen() : React.ReactNode {
const handleMobileLogin = async (id: string) : Promise<void> => {
try {
// Fetch the public key from server
console.log('makig request to /auth/mobile-login/request', id);
const response = await webApi.authFetch<{ clientPublicKey: string }>(
`auth/mobile-login/request/${id}`,
{ method: 'GET' }
@@ -210,8 +209,6 @@ export default function MobileUnlockConfirmScreen() : React.ReactNode {
},
});
console.log('[_qrconfirm] rendered with id:', id);
// Show loading during processing
if (isProcessing) {
return (

View File

@@ -112,7 +112,6 @@ export default function QRScannerScreen() : React.ReactNode {
*/
setIsLoadingAfterScan(false);
console.log('[_qrscanner] navigate to mobile-unlock with replace:', parsedData.payload);
router.replace(`/(tabs)/settings/mobile-unlock/${parsedData.payload}` as Href);
}
} catch (error) {

View File

@@ -50,7 +50,6 @@ export default function ActionHandler() : null {
}
// First navigate to settings tab to establish correct navigation stack
console.log('[_actionhandler] navigate to qr-confirm');
router.replace(`/(tabs)/settings/mobile-unlock/${requestId}` as Href);
setHasNavigated(true);
break;

View File

@@ -83,8 +83,6 @@ export function CredentialCard({ credential, onCredentialDelete }: CredentialCar
const handleContextMenuAction = async (event: OnPressMenuItemEvent): Promise<void> => {
const { name } = event.nativeEvent;
console.log('handleContextMenuAction', name);
switch (name) {
case t('credentials.contextMenu.edit'):
Keyboard.dismiss();

View File

@@ -195,7 +195,6 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
* This is called by AppContext after revoking tokens on the server.
*/
const clearAuth = useCallback(async (errorMessage?: string): Promise<void> => {
console.log('Clearing auth --- attempt');
// Clear credential identity store (password and passkey autofill metadata)
try {
await NativeVaultManager.removeCredentialIdentities();
@@ -439,7 +438,6 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
// Check if vault is unlocked.
const isUnlocked = await isVaultUnlocked();
if (!isUnlocked) {
console.log('-------- vault NOT unlocked trigger detection here ---------------------')
// Get current full URL including query params
const currentRoute = lastRouteRef.current;
if (currentRoute?.path) {

View File

@@ -99,14 +99,12 @@ export class PostUnlockNavigation {
// Priority 1: Handle pending deep link (e.g. from QR code scan or native autofill interface)
if (pendingDeepLink) {
console.log('[_postunlocknavigation] navigate with pendingDeepLink:', pendingDeepLink);
this.handlePendingDeepLink(pendingDeepLink, router);
return;
}
// Priority 2: Handle return URL (from reinitialize flow)
if (returnUrl?.path) {
console.log('[_postunlocknavigation] navigate with returnUrl:', returnUrl);
this.handleReturnUrl(returnUrl, router);
if (clearReturnUrl) {
clearReturnUrl();

View File

@@ -597,7 +597,7 @@ public class AuthController(IAliasServerDbContextFactory dbContextFactory, UserM
var loginRequest = await context.MobileLoginRequests.FirstOrDefaultAsync(r => r.Id == requestId);
// Check if request exists and hasn't expired
if (loginRequest == null || loginRequest.CreatedAt.AddMinutes(MobileLoginTimeoutMinutes) < timeProvider.UtcNow)
if (loginRequest == null || loginRequest.CreatedAt.AddSeconds(MobileLoginTimeoutMinutes) < timeProvider.UtcNow)
{
return NotFound(ApiErrorCodeHelper.CreateErrorResponse(ApiErrorCode.MOBILE_LOGIN_REQUEST_NOT_FOUND, 404));
}
@@ -697,7 +697,7 @@ public class AuthController(IAliasServerDbContextFactory dbContextFactory, UserM
var loginRequest = await context.MobileLoginRequests.FirstOrDefaultAsync(r => r.Id == requestId);
// Check if request exists and hasn't expired
if (loginRequest == null || loginRequest.CreatedAt.AddMinutes(MobileLoginTimeoutMinutes) < timeProvider.UtcNow)
if (loginRequest == null || loginRequest.CreatedAt.AddSeconds(MobileLoginTimeoutMinutes) < timeProvider.UtcNow)
{
return NotFound(ApiErrorCodeHelper.CreateErrorResponse(ApiErrorCode.MOBILE_LOGIN_REQUEST_NOT_FOUND, 404));
}
@@ -727,7 +727,7 @@ public class AuthController(IAliasServerDbContextFactory dbContextFactory, UserM
var loginRequest = await context.MobileLoginRequests.FirstOrDefaultAsync(r => r.Id == model.RequestId);
// Check if request exists and hasn't expired
if (loginRequest == null || loginRequest.CreatedAt.AddMinutes(MobileLoginTimeoutMinutes) < timeProvider.UtcNow)
if (loginRequest == null || loginRequest.CreatedAt.AddSeconds(MobileLoginTimeoutMinutes) < timeProvider.UtcNow)
{
return NotFound(ApiErrorCodeHelper.CreateErrorResponse(ApiErrorCode.MOBILE_LOGIN_REQUEST_NOT_FOUND, 404));
}