Refactor code structure for improved readability and maintainability; optimize performance across multiple modules.
All checks were successful
Deploy to production / deploy (push) Successful in 2m56s
All checks were successful
Deploy to production / deploy (push) Successful in 2m56s
This commit is contained in:
58
android/APP_LINKS.md
Normal file
58
android/APP_LINKS.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Android App Links und OAuth
|
||||
|
||||
## Verbindliche Domain
|
||||
|
||||
Die Produktions-App verwendet ausschließlich `https://www.your-part.de`.
|
||||
Staging und lokale Builds öffnen diese URLs weiterhin im Browser und beanspruchen keine
|
||||
Domain-Verknüpfung.
|
||||
|
||||
## Unterstützte Pfade
|
||||
|
||||
| Web-Pfad | Native Route | Anmeldung |
|
||||
| --- | --- | --- |
|
||||
| `/` | `home` | ja |
|
||||
| `/socialnetwork/*` | Community, Suche, Galerie, Forum oder Vokabeln | ja |
|
||||
| `/falukant/*` | `falukant` | ja |
|
||||
| `/settings/*` | `settings` | ja |
|
||||
| `/blogs/*` | `blogs` | nein |
|
||||
| `/guides/*` | `guides` | nein |
|
||||
| `/android/oauth/callback` | OAuth-Callback | nein |
|
||||
|
||||
Geschützte Links bleiben im Speicher erhalten. Nach erfolgreichem Login navigiert die App
|
||||
automatisch zur ursprünglich angeforderten Route.
|
||||
|
||||
## OAuth
|
||||
|
||||
Die native App startet `/api/auth/oauth/{provider}/start?client=android` in einer Android
|
||||
Custom Tab. Der Server erzeugt PKCE und `state`, speichert beides in Redis und nutzt als feste
|
||||
Redirect-URI `https://www.your-part.de/android/oauth/callback`. Die App sendet nur `code`,
|
||||
`state` und optional `iss` an `/api/auth/oauth/exchange`; Tokens von OAuth-Providern gelangen
|
||||
nicht in die App.
|
||||
|
||||
In jedem aktivierten Provider muss diese URI als Redirect URI hinterlegt sein:
|
||||
|
||||
```text
|
||||
https://www.your-part.de/android/oauth/callback
|
||||
```
|
||||
|
||||
Optional kann das Backend die URL mittels `OAUTH_ANDROID_CALLBACK_URL` überschreiben. Der Wert
|
||||
muss HTTPS verwenden und exakt den Pfad `/android/oauth/callback` haben.
|
||||
|
||||
## assetlinks.json
|
||||
|
||||
Nach Erzeugung des Release-Keystores den SHA-256-Fingerprint ermitteln:
|
||||
|
||||
```bash
|
||||
keytool -list -v -keystore release.jks -alias <alias>
|
||||
```
|
||||
|
||||
`frontend/public/.well-known/assetlinks.json.example` nach
|
||||
`frontend/public/.well-known/assetlinks.json` kopieren, den Platzhalter durch den Fingerprint
|
||||
ersetzen und mit dem Frontend ausliefern. Die finale Datei muss unter dieser URL ohne Redirect
|
||||
und mit `Content-Type: application/json` abrufbar sein:
|
||||
|
||||
```text
|
||||
https://www.your-part.de/.well-known/assetlinks.json
|
||||
```
|
||||
|
||||
Erst dann kann Android `android:autoVerify` erfolgreich abschließen.
|
||||
Reference in New Issue
Block a user