fix: improve GPS enrollment and simplify Auth0 SSO

- Remove dashes from device identifiers for better compatibility
- Auto-enable consent on enrollment (HR handles consent at hiring)
- Remove consent checks from location queries and UI
- Simplify Traccar Admin to use Auth0 SSO directly
- Fix server URL to return base Traccar URL (app handles port)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-03 18:56:16 +01:00
parent 5ded039793
commit 5a22a4dd46
4 changed files with 19 additions and 47 deletions

View File

@@ -342,21 +342,12 @@ export class TraccarClientService implements OnModuleInit {
}
/**
* Get the device port URL for mobile app configuration
* Returns full HTTPS URL - nginx terminates SSL on port 5055
* Get the device server URL for mobile app configuration
* Returns the Traccar URL (nginx handles SSL termination and proxies to Traccar)
*/
getDeviceServerUrl(): string {
const port = this.configService.get<string>('TRACCAR_DEVICE_PORT') || '5055';
// Use the Traccar public URL to derive the device server hostname
const traccarUrl = this.getTraccarUrl();
try {
const url = new URL(traccarUrl);
// Return HTTPS URL - nginx terminates SSL and proxies to Traccar
return `https://${url.hostname}:${port}`;
} catch {
return `http://localhost:${port}`;
}
// Return the base Traccar URL - nginx handles routing OsmAnd protocol
return this.getTraccarUrl();
}
// ============================================