.. | ||
.well-known | ||
app.vite.config.js | ||
app_index.ts | ||
AppIndex.svelte | ||
build_and_deploy.sh | ||
index.html | ||
land.html | ||
land.ts | ||
passthrough.html | ||
README.md |
app-directory
This directory contains the files for "https://app.mapcomplete.org". This does not contain the Android files, but it contains some helper HTML.
The main function is to help authentication.
The authentication flow in a nutshell:
- The user want to authenticate
- The app opens a browser window, showing the OSM.org login page
- The browser redirects to "app.mapcomplete.org/land.html"; which obtains an authentication token
- Once the token is obtained, the browser redirects to "app.mapcomplete.org/passthrough.html?auth_token=<...>".
- This URL is an "authenticated URL" and will thus be opened in the app, where
- The native shell receives the intent with the authentication token
- The native shell passes this to the web context
- The webcontext passes the token to the OSM-connection
- ???
- Profit!
The 'assetlinks-file'
The hidden folder ".well-known" should be put on the website as well; https://app.mapcomplete.org/.well-known/assetlinks.json
must return the relevant JSON
A note about building and deploying
These files should be relatively static and not change a lot. The deploy script is included in this directory (but not in CI)
These are deployed in the hetzner server in the /root/app/*
-directory; see the hetzner caddyfile for more info