Skip to content

Say the app's name when asking devnull to approve the phone - #140

Open
mnapoli wants to merge 3 commits into
NativePHP:mainfrom
mnapoli:feat/app-name
Open

mnapoli wants to merge 3 commits into
NativePHP:mainfrom
mnapoli:feat/app-name

Conversation

@mnapoli

@mnapoli mnapoli commented Oct 31, 2026 •

Copy link
Copy Markdown

Settings → Devices on dev-null.sh only shows the device's name, so apps can't be told apart there. The app now sends its own name when it opens /mobile/authorize: app_name is "/dev/null for iOS" or "/dev/null for Android", using System::isIos(). The web then shows "/dev/null for iOS on iPhone" (dev-null-sh/dev-null.sh#1339).

It also sends a stable app_id, which stays when the name changes: ios: or android: followed by the bundle id from config('nativephp.app_id'). The two platforms get different ids because they are different apps, even with the same bundle id. If a build's .env doesn't carry the bundle id, it sends the release one, com.nativephp.devnull.

device_name becomes just the model ("iPhone", "Pixel 9"), because the web now adds the app's name in front of it. Otherwise it would read "/dev/null for iOS on devnull on iPhone".

Depends on dev-null-sh/dev-null.sh#1339. Please release this only after #1339 is deployed. Before that, the server ignores app_name, so phones approved in between would show as just "iPhone" until they are approved again.

Sign in with Apple uses the same device name and doesn't send app_name yet: its server endpoint isn't live. It can send it once that endpoint exists.

Tests: composer setup:free, then php artisan test: 1700 passed, 1 skipped. Pint passes on the changed files.

Screenshots

  • No visible change

Nothing changes in the app itself, only the URL it opens to sign in.

@mnapoli
mnapoli marked this pull request as ready for review October 31, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant