-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Apple OAuth2 does not return user name, causing App Store rejection #7090
Description
When using Apple OAuth2 with Flutter and the PocketBase Dart SDK, the returned user meta does not include the user's name, even on the first authorization.
This causes issues with App Store review, as Apple requires displaying the user’s name after sign-in.
Steps to reproduce:
Set up Apple OAuth2 provider in PocketBase.
Use Flutter and the Dart SDK:
final authData = await pb.collection('users').authWithOAuth2('apple', (url) async {
// open the URL for user sign-in
});
Delete the app from the Apple ID account.
Sign in again.
Actual result:
authData.meta.name is empty:
{
"name": "",
"email": "*****@gmail.com",
"isNew": true,
"rawUser": {
"email": "*****@gmail.com",
"email_verified": true,
"sub": "..."
}
}
Expected result:
On the first authorization, name should contain the full name provided by Apple (firstName and lastName).
Notes:
I confirmed this multiple times after removing the app from my Apple ID account.
I found this discussion: #6118
It mentions that the Apple user parameter in the initial POST contains the name, but PocketBase’s apple.go implementation may not be capturing it.
I plan to clone the repo and add debug logs in tools/auth/apple.go to check if Apple’s user JSON is returned, and will submit a PR if confirmed.
Environment:
PocketBase version: 29.2
Platform: iOS