What is the default URL for the frontend in a built Tauri 2.0 application? #11091
-
Hi everyone, I'm working on a desktop app using Tauri 2.0 and Angular. In the development environment, my Angular frontend runs on localhost:4200, which is configured in the tauri.conf.json. However, after building the application for production, it no longer works because http://localhost:4200 obviously isn't available anymore. My question is: What is the default URL or URI scheme for the frontend in a built Tauri 2.0 application? I want to ensure that the app correctly serves the static files after the build and that an OAuth2-based authentication with a redirectUri will work as expected. Here's my build environment: // This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
import { environmentDefault } from './default';
export const environment = {
...environmentDefault,
production: false,
environmentName: 'TAURI_PROD',
apiUrl: 'https://mydefaulturl.com',
pngPrefixUrl: 'https://mydefaultpnguri.com/media/',
identityServer: {
issuer: 'https://auth.mydefaulturl.com/',
redirectUri: 'http://localhost:4200/authentication-callback',
postLogoutRedirectUri: 'http://localhost:4200',
loginUrl: 'https://auth.mydefaulturl.com/authorize',
clientId: 'dummyId',
dummyClientSecret: 'dummyPass',
responseType: 'code',
oidc: false,
scope: 'default',
//autoSaveToken: true,
tokenEndpoint: 'https://auth.mydefaulturl.com/token'
}
};
/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
import 'zone.js/plugins/zone-error'; // Included with Angular CLI. The problem is probably the redirectUri Thanks for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
On windows and android it's |
Beta Was this translation helpful? Give feedback.
On windows and android it's
http://tauri.localhost/
and on linux/macos/ios it'stauri://localhost/