firebase / firebase/firebase-android-sdk
"Unable to process request due to missing initial state" when using startActivityForSignInWithProvider with Apple sign in
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 710
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 34
Description
### [REQUIRED] Step 2: Describe your environment
* Android Studio version: N/A. Visual Studio 2022 Version 17.10.5
* Firebase Component: Authentication
* Component version: 22.3.1.2
### [REQUIRED] Step 3: Describe the problem
#### Steps to reproduce:
Following [Authenticate Using Apple on Android](https://firebase.google.com/docs/auth/android/apple), I have this code (C# but it should be equivalent to Java):
```cs
var activity = await Platform.WaitForActivityAsync();
var provider = OAuthProvider.NewBuilder("apple.com").Build();
try
{
var authResult = await auth.StartActivityForSignInWithProvider(activity, provider).AsAsync();
FbUser = authResult.User;
return authResult.Credential;
}
catch (FirebaseAuthWebException ex)
{
if (ex.ErrorCode == "ERROR_WEB_CONTEXT_CANCELED")
{
return null;
}
throw;
}
```
After calling `StartActivityForSignInWithProvider`, an in-app browser is opened but after signing in successfully, this page opens instead:

Closing this page by pressing X on the top left corner also closes my app and the next time the app starts, it is stuck at the splash screen and has to be restarted.
#### Relevant Code:
See above.
Contributor guide
Assessment
This issue has not been assessed yet.