On iOS, Sign in with Apple will provide an e-mail address if the user is logging in for the first time. On all subsequent logins, the e-mail address will be missing. However, this can be reset by removing the app from your Apple ID. If you then try to login again, the e-mail dialog will popup again, and the app will receive this e-mail.
On visionOS, however, the latter does not happen. Even if I have removed the app from my Apple ID, the e-mail dialog won't show up again. The only way to resolve this is to reset the visionOS simulator (haven't tried it on a real device).
Sign in with Apple
RSS for tagSign in with Apple enables users to sign into apps and websites using their Apple ID.
Posts under Sign in with Apple tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Our website supports Apple login, but after logging in, the server obtains the private mailbox of Apple users, but we found that sending emails to this private mailbox failed. The following is the response result I sent to the privacy mailbox using Google mailbox
When transferring an app from one team to another, Sign in with Apple users have to me carefuly migrated since their unique identifiers are team-scoped.
To migrate users from Team A to Team B, a transient transfer identifier, aka transfer_sub, has to be generated by Team A before the transfer to prepare the app data, using specific migration endpoints provided by Apple. "Preparing the app data" means, for example, associate database entries to the transfer id instead of the team-specific id.
One the app has been transferred, and during 60 days, Team B will find the transfer_sub in ID tokens issued by Apple Sign In, and thanks to this shared identifier they can retrieve the user data and associate it to their new unique identifier.
So far so good !
Now, the question : if an app is transferred from Team A to Team B, and then, shortly thereafter (a few days later), from team B to team C, will the transfer_sub related to the B-C transfer be different ? Or will they remain the same as the ones issued for the A-B transfer ?
(I'm asking this question in order to avoid the possible catastrophe of an ill-prepared double app transfer)
Thank you !
Topic:
Privacy & Security
SubTopic:
General
Tags:
Sign in with Apple REST API
Privacy
Sign in with Apple
We have been having issues where apple has provided the same sub for two different users. I was under the impression the sub is supposed to be unique?
The issue became exacerbated when we transfered an app from one org to another. On transferring the users.
Two different transfer subs, resulted in the same sub.
Hello,
our Sign in with Apple Button no longer works and throws an 7003 error. It worked a few days ago but suddenly fails.
Any ideas how to fix this?
Thanks in advance!
plist:
<dict>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
...
Code:
var body: some View {
VStack {
SignInWithAppleButton(.signUp) { request in
request.requestedScopes = [.fullName, .email]
} onCompletion: { result in
switch result {
case .success(let authResults):
handleSuccess(authorization: authResults)
case .failure(let error):
self.credentialFailure = true
self.errorMessage = .appleSignInError
logger.error("SIWA login failure: \(error)")
}
}
.signInWithAppleButtonStyle(.white)
.cornerRadius(GlobalValues.cornerRadius)
}
}
Error:
Authorization failed: Error Domain=AKAuthenticationError Code=-7003 "(null)" UserInfo={AKClientBundleID=com.our.app}
ASAuthorizationController credential request failed with error: Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1001 "(null)"
SIWA login failure: Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1001 "(null)"
Hi all,
I create web app laravel with function login with apple. This is any my information app and packet what i'm use :
Laravel: 10.x
PHP: 8.1
Packages for login: https://socialiteproviders.com/
I'm done with API appleid.apple.com/auth/authorize for auth user with apple ID. Response below :
So next step i call to this API : https://appleid.apple.com/auth/token for verify token but response is below :
I'm try with postman but response is same that ( invalid_client ). Everything is correct( client_id, team_id, private_key ). I use https://jwt.io/#debugger for test verify token. Signature Verified is result.
Can help me for declare what is issue ? what client is invalid ? Thank you so much.
P/s : Sorry for my poor English
I had implemented the Apple login feature and users were fully utilizing it.
Then, all of a sudden, it started to fail with an "Invalid client scope
" error.
And My code is exactly scope="name email".
I haven't changed any code for Apple Login, so why is this suddenly happening?
Hello Apple ID support,
When a user successfully login with Apple, the apple OAuth will produce a appleIdToken. From my understanding this token is best to not leave the user device. I have two sub-system that can take a appleIdToken and manages the token-refresh separately.
In short:
Apple -> appleIdToken
sub-SystemA(appleIdToken) and sub-systemB(appleIdToken)
sub-SystemA and sub-systemB has two separate token management/refresh
The question:
Is this allowed by the Apple identify server?
Is the usecase of supplying appleIdToken to sub-SystemA and sub-systemB valid?
Question about "Sign in with Apple".
Can 2 apps from 2 different developer accounts (hence, 2 different team ID) share authentications?
In other words, can I get consistent user ID from 2 different app under 2 different developer account? Is there a way to configure that from developer portal?
Thanks
Bill
I am getting an error "Cannot create a iOS App Development provisioning profile for "TheSwiftUIWay.login".
Personal development teams, including "Cyril John", do not support the Sign in with Apple capability"
I have created a developer account but I didnt enroll in the developer program. Am I able to use Sign-In with Apple with the free version of the Apple Developer Account? If so, can you please give me some directions on how I can fix this error?
In order to use Sign in with Apple, I issued a JWT client according to the instructions and was able to connect without any problems, but suddenly an INVALID_CLIENT error started to occur.
The error was resolved by re-obtaining the JWT client token and resetting it.
The validity period of the JWT client token is 6 months and it has not expired yet, but I would like to know why I am getting an INVALID_CLIENT error.
Xcode 15.2, iOS 17.2
I have a piece of code that displays videos. It has been working for at least 6 months. Suddenly only the first video played. The following videos would only play audio with the video being frozen at the first frame. I noticed that SwiftUI would start to instantiate multiple instances of my player observable class instead of just one.
After chasing the problem for most of a day I found that if I completely removed every piece of code referencing AuthenticationServices then everything would work fine again.
Even if I add the following piece of code which is not used or called in any way. Then SwiftUI will start to act weird.
func configure(_ request: ASAuthorizationAppleIDRequest) {
request.requestedScopes = [.fullName, .email]
}
If I comment out request.requestedScopes = [.fullName, .email] everything works fine.
The SignInWithApple is configured and works fine if I enable the code.
Any suggestions on how to solve or any work arounds would be highly appreciated.
Problem Situation
User membership withdrawal request → revoke API call
It always returns status code 200, but once out of 5~10, it remains an app linked to the user's Apple ID.
Re-request user Apple login → Email is returned as null
Currently, the only solution is for users to manually delete apps linked to their Apple ID. Email sent when re-requesting Apple login
When the above problem occurs, even if the Revoke API is called multiple times, the app linked to the user's Apple ID is not deleted, and when requesting Refresh Token validation, it has already expired.
Releated Issues
https://forums.developer.apple.com/forums/thread/707181
I'm following the steps outlined to be able to email users that have used Apple Sign-in that is listed here and I have a green check for SPF status. I used my email &lt;my_email_here&gt;@gmail.com, but when I try to send an email from the email address configured to the private relay email I don't see my test email coming through.
I also tried sending an email from a non configured email and I don't back any sort of error message, not sure if I should though.
Is there a delay in how quickly the email is received?
The type of the email_verified (standard) claim is STRING. According to the specification [1] it should be BOOLEAN.
Current Example Returned by Apple:
"email_verified": "true"
OpenID Standard Should Ve:
"email_verified": true
[1]openid.net/specs/openid-connect-core-1_0.html#StandardClaims
We have a game that provides a mechanism to log into the game with Sign in with Apple in a direct integration between the game and Apple (first mechanism). We also provide a mechanism to log into the game using OpenID connect with authorization from Apple but using a server in the middle that drives the process (second mechanism). It is important to mention that both mechanisms use the same oauth client.
We have been able to switch from the first mechanism to the second successfully, but there is a problem with id_token.
In the second mechanism we request the scopes "email", "openid" and "name", but in the retrieved id_token there is no information about the email. It happens for all users who previously signed in with Apple using the first mechanism (therefore there is a current link between the game and the user in AppleId). It does not happen with users who had no link between the game and the user and use the second mechanism, in this case we can retrieve the user information in the callback of the first call and the email in the id_token, as stated in the documentation.
However, if users who had a link between the game and the AppleId delete the app and then log back in using the second mechanism, then we can get the email information with the exact same request.
The request we use to obtain the authorized endpoint information (https://appleid.apple.com/auth/authorize) has these parameters:
response_mode: query
scope: email openid profile
nonce: ...
state: ...
response_type: code
Then we get the authentication code and get an id_token like this:
{
"iss":"https://appleid.apple.com",
"aud":"{aud}",
"exp":1705584621,
"iat":1705498221,
"sub":"{sub}",
"nonce":"7f-PqBoXgxeDMOEu5Ysov0FjE9GvSYfq",
"at_hash":"3kLcPBlwZP6aj_mscww5zA",
"authentication_time":1705498218,
"nonce_supported":true
}
Is there a way to retrieve the email for users who had the link and don't want to delete it or log back into the app? In the official Apple documentation it is stated that the id_token should have the email but this is not the case.
https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api/authenticating_users_with_sign_in_with_apple#3383773
The sign in with Apple prereqs state that:
you must have an existing app in the App Store that uses Sign in with Apple
If you want to support sign in with apple on a website but do not need an iOS app specifically for that website is possible to have a "dummy" app that isn't released to the app store but will serve to support sign in with Apple?
Hello,
we implemented Apple Sign-In in our website long ago, and it worked well.
Recently we have found a strange behaviour.
The first time we make the request to the /auth/token endpoint we get an invalid_client error.
Our client id is com.spicysparks.service.id
If we make a request another time with exactly the same data it works fine.
We noticed we get this error only when we try a newly generated client secret for the first time.
We are trying to integrate "Sign in with Apple" and are facing an issue where all users who chose to use Apple's private relay with the hide my email feature are unable to receive any mail sent by us.
We have added our domain, mail from domain & email address to https://developer.apple.com/account/resources/services/configure and also verified the SPF. We also have DKIM setup.
We use SES as our email provider and have added its SPF as recommended aswell.
I have attached a sample delivery log from SES below.
{"notificationType":"Delivery","mail":{"timestamp":"2024-01-17T10:20:07.592Z","source":"\"Redacted\" <admin@redacted>","sourceArn":"arn:aws:ses:ap-south-1:redacted:identity/redacted","sourceIp":"34.redacted","callerIdentity":"redacted-ses","sendingAccountId":"redacted","messageId":"redacted","destination":["redacted@privaterelay.appleid.com"]},"delivery":{"timestamp":"2024-01-17T10:20:12.385Z","processingTimeMillis":4793,"recipients":["redacted@privaterelay.appleid.com"],"smtpResponse":"250 2.0.0 Ok: queued as redacted","remoteMtaIp":"redacted","reportingMTA":"redacted.smtp-out.ap-south-1.amazonses.com"}}
Topic:
Privacy & Security
SubTopic:
General
Tags:
Sign in with Apple
Sign in with Apple JS
Sign in with Apple REST API
I'm trying to set up Sign In With Apple on my .NET 7 Web App (Not sure how many people here use this). I followed the guide by Scott Brady here: https://www.scottbrady91.com/openid-connect/implementing-sign-in-with-apple-in-aspnet-core
It reaches Apple Sign In OK, authenticates, and passes back to my server, but the callback responds with this error.
OpenIdConnectProtocolException: Message contains error: 'invalid_client', error_description: 'error_description is null', error_uri: 'error_uri is null'.
Googling hasn't helped much, other than I saw a post saying to wait 48 hours, which I have now done (not that that makes sense anyway).
Any idea whats been done wrong? Code below, replacing sensitive data.
Startup.cs
.AddOpenIdConnect("apple", async options =>
{
options.Authority = "https://appleid.apple.com"; // disco doc: https://appleid.apple.com/.well-known/openid-configuration
options.ClientId = "com.rackemapp.applelogin"; // Service ID
options.CallbackPath = "/signin-apple"; // corresponding to your redirect URI
options.ResponseType = "code id_token"; // hybrid flow due to lack of PKCE support
options.ResponseMode = "form_post"; // form post due to prevent PII in the URL
options.UsePkce = false; // apple does not currently support PKCE (April 2021)
options.DisableTelemetry = true;
options.Scope.Clear(); // apple does not support the profile scope
options.Scope.Add("openid");
options.Scope.Add("email");
options.Scope.Add("name");
options.Events.OnAuthorizationCodeReceived = context =>
{
context.TokenEndpointRequest.ClientSecret = AppleTokenGenerator.CreateNewToken();
return Task.CompletedTask;
};
});
Apple Token Generator
public static class AppleTokenGenerator
{
public static string CreateNewToken()
{
const string iss = "[MyTeamId]"; // your account's team ID found in the dev portal
const string aud = "https://appleid.apple.com";
const string sub = "com.rackemapp.applelogin"; // same as client_id
var now = DateTime.UtcNow;
// contents of your .p8 file
const string privateKey = "[MyKey]";
var ecdsa = ECDsa.Create();
ecdsa?.ImportPkcs8PrivateKey(Convert.FromBase64String(privateKey), out _);
var handler = new JsonWebTokenHandler();
return handler.CreateToken(new SecurityTokenDescriptor
{
Issuer = iss,
Audience = aud,
Claims = new Dictionary<string, object> { { "sub", sub } },
Expires = now.AddMinutes(5), // expiry can be a maximum of 6 months - generate one per request or re-use until expiration
IssuedAt = now,
NotBefore = now,
SigningCredentials = new SigningCredentials(new ECDsaSecurityKey(ecdsa), SecurityAlgorithms.EcdsaSha256)
});
}
}
Also attached, images of my keys and setp in developer portal