mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-12 17:26:22 +00:00
feat: add scripts to enable login flow from localhost
This commit is contained in:
@@ -52,7 +52,7 @@ All the npm scripts are defined in `package.json` [file](package.json). It is re
|
||||
|
||||
## Most useful commands
|
||||
|
||||
## Editing the Ionic Database from the browser
|
||||
### Editing the Ionic Database from the browser
|
||||
|
||||
Add the following function using the browser console
|
||||
|
||||
@@ -90,6 +90,19 @@ You'll need to run _Chromium_ using
|
||||
pnpm chromium:no-cors
|
||||
```
|
||||
|
||||
### Help, I can't log in!
|
||||
|
||||
Login services will often block hosts not coming from the production
|
||||
server. You can circumvent this locally by using the `:virtual-host`
|
||||
scripts:
|
||||
|
||||
```shell
|
||||
# Start the dev server on mobile.app.uni-frankfurt.de
|
||||
pnpm start:virtual-host
|
||||
# Run chromium with flags that redirect mobile.app.uni-frankfurt.de to localhost:8100
|
||||
pnpm chromium:virtual-host
|
||||
```
|
||||
|
||||
### Running the app
|
||||
|
||||
Install the npm packages needed for running the app (as for any other node project which uses npm):
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"changelog": "conventional-changelog -p angular -i src/assets/about/CHANGELOG.md -s -r 0",
|
||||
"check-icons": "ts-node-esm scripts/check-icon-correctness.ts",
|
||||
"chromium:no-cors": "chromium --disable-web-security --user-data-dir=\".browser-data/chromium\"",
|
||||
"chromium:virtual-host": "chromium --host-resolver-rules=\"MAP mobile.app.uni-frankfurt.de:* localhost:8100\" --ignore-certificate-errors",
|
||||
"cypress:open": "cypress open",
|
||||
"cypress:run": "cypress run",
|
||||
"docker:build": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"npm install && npm run build\"",
|
||||
@@ -47,6 +48,7 @@
|
||||
"start": "ionic serve",
|
||||
"start:external": "ionic serve --external",
|
||||
"start:prod": "ionic serve --prod",
|
||||
"start:virtual-host": "ionic serve --public-host=mobile.app.uni-frankfurt.de --ssl=true --open=false",
|
||||
"test": "ng test --code-coverage",
|
||||
"test:integration": "sh integration-test.sh"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user