mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-10 11:42:59 +00:00
build: use custom url scheme independent from appId
This commit is contained in:
@@ -21,7 +21,6 @@ import {
|
|||||||
} from '@openid/appauth';
|
} from '@openid/appauth';
|
||||||
import {Browser, IAuthConfig} from 'ionic-appauth';
|
import {Browser, IAuthConfig} from 'ionic-appauth';
|
||||||
import {PAIAAuthService} from '../paia/paia-auth.service';
|
import {PAIAAuthService} from '../paia/paia-auth.service';
|
||||||
import config from '../../../../../capacitor.config';
|
|
||||||
import {ConfigProvider} from '../../config/config.provider';
|
import {ConfigProvider} from '../../config/config.provider';
|
||||||
import {
|
import {
|
||||||
SCAuthorizationProvider,
|
SCAuthorizationProvider,
|
||||||
@@ -117,6 +116,8 @@ function getEndpointsConfig(
|
|||||||
* Return a URL of the app, depending on the platform where it is running
|
* Return a URL of the app, depending on the platform where it is running
|
||||||
*/
|
*/
|
||||||
function getRedirectUrl(routePath: string): string {
|
function getRedirectUrl(routePath: string): string {
|
||||||
const appSchema = Capacitor.isNativePlatform() ? config.appId : 'https';
|
const appSchema = Capacitor.isNativePlatform()
|
||||||
|
? environment.custom_url_scheme
|
||||||
|
: 'https';
|
||||||
return `${appSchema}://${environment.app_host}/${routePath}`;
|
return `${appSchema}://${environment.app_host}/${routePath}`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ export const environment = {
|
|||||||
backend_url: 'https://mobile.server.uni-frankfurt.de',
|
backend_url: 'https://mobile.server.uni-frankfurt.de',
|
||||||
daia_url: 'https://daia.hebis.de/DAIA2/UB_Frankfurt',
|
daia_url: 'https://daia.hebis.de/DAIA2/UB_Frankfurt',
|
||||||
app_host: 'mobile.app.uni-frankfurt.de',
|
app_host: 'mobile.app.uni-frankfurt.de',
|
||||||
|
custom_url_scheme: 'de.anyschool.app',
|
||||||
backend_version: '2.0.0',
|
backend_version: '2.0.0',
|
||||||
use_fake_backend: false,
|
use_fake_backend: false,
|
||||||
production: false,
|
production: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user