unity-game-engineauthenticationapple-sign-insign-in-with-apple

Unity Authentication Apple "SignInWithAppleAsync" Request failed: 401 "detail":"invalid audience"


I can successfully get "idToken" using Apple sign-in. Then I call "SignInWithAppleAsync(idToken)" get error sign in failed. Unity version: 2020.3.33f1 Authentication Package: 3.2.0

await AuthenticationService.Instance.SignInWithAppleAsync(idToken);

Request completed with error: Request failed: 401, {"detail":"invalid audience","details":[],"status":401,"title":"PERMISSION_DENIED"}, request-id: e7ee1cfb-ecd7-4819-86d7-d3fcaa67b16e

All logs are included below

[Authentication]: Request failed: 401, {"detail":"invalid audience","details":[],"status":401,"title":"PERMISSION_DENIED"}, request-id: e7ee1cfb-ecd7-4819-86d7-d3fcaa67b16e
Unity.Services.Authentication.AuthenticationExceptionHandler:ConvertException(WebRequestException)
Unity.Services.Authentication.<HandleSignInRequestAsync>d__168:MoveNext()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Runtime.CompilerServices.MoveNextRunner:Run()
System.Action:Invoke()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&)
System.Threading.Tasks.Task:FinishContinuations()
System.Threading.Tasks.Task`1:TrySetException(Object)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetException(Exception)
Unity.Services.Authentication.<SendAsync>d__15`1:MoveNext()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Runtime.CompilerServices.MoveNextRunner:Run()
System.Action:Invoke()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&)
System.Threading.Tasks.Task:FinishContinuations()
System.Threading.Tasks.Task`1:TrySetException(Object)
System.Threading.Tasks.TaskCompletionSource`1:TrySetException(Exception)
System.Threading.Tasks.TaskCompletionSource`1:SetException(Exception)
Unity.Services.Authentication.WebRequest:RequestCompleted(TaskCompletionSource`1, Int64, Boolean, Boolean, String, String, IDictionary`2)
Unity.Services.Authentication.<>c__DisplayClass16_0:<SendAttemptAsync>b__0(AsyncOperation)
System.Action`1:Invoke(T)
UnityEngine.AsyncOperation:InvokeCompletionEvent()

What is 'invalid audience' ??? There is no document about this.

Sign in failed!!
<SignInWithAppleAsync>d__31:MoveNext()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Runtime.CompilerServices.MoveNextRunner:Run()
System.Action:Invoke()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&)
System.Threading.Tasks.Task:FinishContinuations()
System.Threading.Tasks.Task`1:TrySetException(Object)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetException(Exception)
Unity.Services.Authentication.<HandleSignInRequestAsync>d__168:MoveNext()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Runtime.CompilerServices.MoveNextRunner:Run()
System.Action:Invoke()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&)
System.Threading.Tasks.Task:FinishContinuations()
System.Threading.Tasks.Task`1:TrySetException(Object)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetException(Exception)
Unity.Services.Authentication.<SendAsync>d__15`1:MoveNext()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Runtime.CompilerServices.MoveNextRunner:Run()
System.Action:Invoke()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&)
System.Threading.Tasks.Task:FinishContinuations()
System.Threading.Tasks.Task`1:TrySetException(Object)
System.Threading.Tasks.TaskCompletionSource`1:TrySetException(Exception)
System.Threading.Tasks.TaskCompletionSource`1:SetException(Exception)
Unity.Services.Authentication.WebRequest:RequestCompleted(TaskCompletionSource`1, Int64, Boolean, Boolean, String, String, IDictionary`2)
Unity.Services.Authentication.<>c__DisplayClass16_0:<SendAttemptAsync>b__0(AsyncOperation)
System.Action`1:Invoke(T)
UnityEngine.AsyncOperation:InvokeCompletionEvent()
WebRequestException: {"detail":"invalid audience","details":[],"status":401,"title":"PERMISSION_DENIED"}
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Services.Authentication.WebRequest+<SendAsync>d__15`1[T].MoveNext () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task`1[TResult].TrySetException (System.Object exceptionObject) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.TaskCompletionSource`1[TResult].TrySetException (System.Exception exception) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.TaskCompletionSource`1[TResult].SetException (System.Exception exception) [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Services.Authentication.WebRequest.RequestCompleted (System.Threading.Tasks.TaskCompletionSource`1[TResult] tcs, System.Int64 responseCode, System.Boolean isNetworkError, System.Boolean isServerError, System.String errorText, System.String bodyText, System.Collections.Generic.IDictionary`2[TKey,TValue] headers) [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Services.Authentication.WebRequest+<>c__DisplayClass16_0.<SendAttemptAsync>b__0 (UnityEngine.AsyncOperation operation) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Action`1[T].Invoke (T obj) [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.AsyncOperation.InvokeCompletionEvent () [0x00000] in <00000000000000000000000000000000>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Services.Authentication.AuthenticationServiceInternal+<HandleSignInRequestAsync>d__168.MoveNext () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task`1[TResult].TrySetException (System.Object exceptionObject) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException (System.Exception exception) [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Services.Authentication.WebRequest+<SendAsync>d__15`1[T].MoveNext () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task`1[TResult].TrySetException (System.Object exceptionObject) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.TaskCompletionSource`1[TResult].TrySetException (System.Exception exception) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.TaskCompletionSource`1[TResult].SetException (System.Exception exception) [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Services.Authentication.WebRequest.RequestCompleted (System.Threading.Tasks.TaskCompletionSource`1[TResult] tcs, System.Int64 responseCode, System.Boolean isNetworkError, System.Boolean isServerError, System.String errorText, System.String bodyText, System.Collections.Generic.IDictionary`2[TKey,TValue] headers) [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Services.Authentication.WebRequest+<>c__DisplayClass16_0.<SendAttemptAsync>b__0 (UnityEngine.AsyncOperation operation) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Action`1[T].Invoke (T obj) [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.AsyncOperation.InvokeCompletionEvent () [0x00000] in <00000000000000000000000000000000>:0 
Rethrow as AuthenticationException: invalid audience
  at Unity.Services.Authentication.AuthenticationServiceInternal+<HandleSignInRequestAsync>d__168.MoveNext () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task`1[TResult].TrySetException (System.Object exceptionObject) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException (System.Exception exception) [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Services.Authentication.WebRequest+<SendAsync>d__15`1[T].MoveNext () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task`1[TResult].TrySetException (System.Object exceptionObject) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.TaskCompletionSource`1[TResult].TrySetException (System.Exception exception) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.TaskCompletionSource`1[TResult].SetException (System.Exception exception) [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Services.Authentication.WebRequest.RequestCompleted (System.Threading.Tasks.TaskCompletionSource`1[TResult] tcs, System.Int64 responseCode, System.Boolean isNetworkError, System.Boolean isServerError, System.String errorText, System.String bodyText, System.Collections.Generic.IDictionary`2[TKey,TValue] headers) [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Services.Authentication.WebRequest+<>c__DisplayClass16_0.<SendAttemptAsync>b__0 (UnityEngine.AsyncOperation operation) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Action`1[T].Invoke (T obj) [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.AsyncOperation.InvokeCompletionEvent () [0x00000] in <00000000000000000000000000000000>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <00000000000000000000000000000000>:0 
  at LoginSystem+<SignInWithAppleAsync>d__31.MoveNext () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task`1[TResult].TrySetException (System.Object exceptionObject) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException (System.Exception exception) [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Services.Authentication.AuthenticationServiceInternal+<HandleSignInRequestAsync>d__168.MoveNext () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task`1[TResult].TrySetException (System.Object exceptionObject) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].SetException (System.Exception exception) [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Services.Authentication.WebRequest+<SendAsync>d__15`1[T].MoveNext () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.Task`1[TResult].TrySetException (System.Object exceptionObject) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.TaskCompletionSource`1[TResult].TrySetException (System.Exception exception) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Threading.Tasks.TaskCompletionSource`1[TResult].SetException (System.Exception exception) [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Services.Authentication.WebRequest.RequestCompleted (System.Threading.Tasks.TaskCompletionSource`1[TResult] tcs, System.Int64 responseCode, System.Boolean isNetworkError, System.Boolean isServerError, System.String errorText, System.String bodyText, System.Collections.Generic.IDictionary`2[TKey,TValue] headers) [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Services.Authentication.WebRequest+<>c__DisplayClass16_0.<SendAttemptAsync>b__0 (UnityEngine.AsyncOperation operation) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Action`1[T].Invoke (T obj) [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.AsyncOperation.InvokeCompletionEvent () [0x00000] in <00000000000000000000000000000000>:0 
<SignInWithAppleAsync>d__31:MoveNext()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Runtime.CompilerServices.MoveNextRunner:Run()
System.Action:Invoke()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&)
System.Threading.Tasks.Task:FinishContinuations()
System.Threading.Tasks.Task`1:TrySetException(Object)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetException(Exception)
Unity.Services.Authentication.<HandleSignInRequestAsync>d__168:MoveNext()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Runtime.CompilerServices.MoveNextRunner:Run()
System.Action:Invoke()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&)
System.Threading.Tasks.Task:FinishContinuations()
System.Threading.Tasks.Task`1:TrySetException(Object)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetException(Exception)
Unity.Services.Authentication.<SendAsync>d__15`1:MoveNext()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Runtime.CompilerServices.MoveNextRunner:Run()
System.Action:Invoke()
System.Threading.ContextCallback:Invoke(Object)
System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&)
System.Threading.Tasks.Task:FinishContinuations()
System.Threading.Tasks.Task`1:TrySetException(Object)
System.Threading.Tasks.TaskCompletionSource`1:TrySetException(Exception)
System.Threading.Tasks.TaskCompletionSource`1:SetException(Exception)
Unity.Services.Authentication.WebRequest:RequestCompleted(TaskCompletionSource`1, Int64, Boolean, Boolean, String, String, IDictionary`2)
Unity.Services.Authentication.<>c__DisplayClass16_0:<SendAttemptAsync>b__0(AsyncOperation)
System.Action`1:Invoke(T)
UnityEngine.AsyncOperation:InvokeCompletionEvent()

Solution

  • as per https://docs.unity.com/ugs/en-us/ma.../faq-sign-in-with-platform-specific-providers usually an invalid audience error means there is a mismatch between the appid/clientid configured and the one in the token. As per: https://docs.unity.com/ugs/en-us/manual/authentication/manual/platform-signin-apple to configure the appId to sign in with apple, the AppId should be the application's BundleId (e.g.: com.example.mygame) and not apple's numerical appId, could you confirm that you have it correctly set up and it still doesn't work?