Android Question FirebaseAuth - authentication - not calling SignedIn event

RichyK68

Active Member
Licensed User
Longtime User
I have set-up a project as per the FirebaseAuth - Authenticate your users article (and also tried the example project zip attached to it). Upon clicking sign-in, I get a list of accounts to select from. Upon selecting the account, the SignedIn event is never called.

The same thing happens in the example zip as well.

B4X:
Sub Process_Globals
   Private auth As FirebaseAuth
End Sub

Sub Globals
   Private lblName As Label
End Sub

Sub Activity_Create(FirstTime As Boolean)
   If FirstTime Then
     auth.Initialize("auth")
   End If
   Activity.LoadLayout("1")
   'Activity.LoadLayout("map")
   If auth.CurrentUser.IsInitialized Then Auth_SignedIn(auth.CurrentUser)
End Sub

Sub btnSignIn_Click
   auth.SignInWithGoogle
End Sub

Sub btnSignOut_Click
   auth.SignOutFromGoogle
   lblName.Text = "Goodbye!"
End Sub

Sub Auth_SignedIn (User As FirebaseUser)
   Log("SignedIn: " & User.DisplayName)
   lblName.Text = "Hello: " & User.DisplayName
End Sub

Can anybody give me any pointers?

Thanks,

Richard
 

RichyK68

Active Member
Licensed User
Longtime User
Thanks Erel, here it is:

** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (signin) Create, isFirst = true **
FirebaseAuth initialized
** Activity (signin) Resume **
onAuthStateChanged: com.google.android.gms.internal.zzbne@dc1b780
SignInWithGoogle called
** Activity (signin) Pause, UserClosed = false **
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
SignInWithGoogle.ResultArrived
ResultArrived Error: null
** Activity (signin) Resume **
 
Upvote 0
Top