pixelfed / mobile-app

Placeholder app repo for issues
https://github.com/pixelfed/pixelfed-rn
92 stars 3 forks source link

Can't add custom instance nor login to custom instance #34

Open nobaraos12 opened 1 year ago

osresearch commented 1 year ago

Same here. The "Sign in to a different server" dialog just returns to the main screen without ever prompting for a login. Watching the logs on the server, I see two requests:

app_1     | X.Y.Z.W - - [20/Nov/2022:16:09:50 +0000] "GET /api/nodeinfo/2.0.json HTTP/1.0" 200 1008 "-" "Pixelfed/4 CFNetwork/1390 Darwin/22.0.0"
app_1     | X.Y.Z.W - - [20/Nov/2022:16:09:50 +0000] "POST /api/v1/apps HTTP/1.0" 404 4978 "-" "Pixelfed/4 CFNetwork/1390 Darwin/22.0.0"
osresearch commented 1 year ago

Doing some detective work, it appears that the official server sets mobile_apis to true in https://pixelfed.social/api/nodeinfo/2.0.json

-            "mobile_apis" : true,
-            "stories" : true,
+            "mobile_apis" : false,
+            "stories" : false,
-            "video" : true
+            "video" : false

mobile_apis is unexpectedly set by the OAUTH_ENABLED environment variable. Setting that to true in my .env.docker file allows me to login via the app!

And perhaps more importantly -- the current flow works with my Single Sign On patches to enable OIDC with keycloak.

osresearch commented 1 year ago

This is working well enough with the SSO changes in https://github.com/pixelfed/pixelfed/pull/3436 that we've moved it into production for our small community.

osresearch commented 1 year ago

This still works with the 1.0.0(5) release, although it does require selecting "manual server login"