firebase / firebase/firebase-android-sdk

Can't login through provider from DialogFragment

Open
#2,033 3 comments 0 reactions 0 assignees View on GitHub
api: auth internal-bug-filed type: feature request
Dominant language
Java
Stars
2.6k
Forks
710
Avg merge
2d 9h
Merged PRs (30d)
31

Description

### Describe your environment
Android Studio version: 4.1 RC 1
Firebase Component: Firebase Authentication
Component version: 19.3.2

### Describe the problem
Hello. I have the problem.
When i try to sign in by _startActivityForSignInWithProvider()_ method :

```kotlin
val provider = OAuthProvider.newBuilder("twitter.com").build()
Firebase.auth
.startActivityForSignInWithProvider(this, provider)
.addOnSuccessListener {
onSignInSuccess()
saveAuthorizationData(it.toRealmAuthorization())
}
.addOnFailureListener { onSignInError(it) }
```
from Activity/Fragmen - It's all right. I can log in with my Twitter provider.
**But (!) when i try to sign in from DialogFragment, which nested into parent fragment, application is stops working. There is no information in logs.**

That's what's going on:
The android application first redirects me to the browser. In browser I sign in into Twitter account, then it starts redirecting me to the application again. I see progress bar, than dimmed desktop screen. Since that moment nothing happens.
Please help, because it makes no sense to call an authorization request outside the dialog.
![1](https://user-images.githubusercontent.com/33492646/94944103-d1e0e500-04e9-11eb-96df-d2bf81c0d377.jpg)
![2](https://user-images.githubusercontent.com/33492646/94944118-d7d6c600-04e9-11eb-99f1-cb9cfa104683.jpg)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.