Open theHilikus opened 3 years ago
That line was added here: https://github.com/firebase/FirebaseUI-Android/pull/1503
To be honest I am not sure what it was meant to do ... seems like you're right and we should probably remove it
@samtstern Initial code reference is pointing to wrong part of README today, so more robust reference is: https://github.com/firebase/FirebaseUI-Android/blob/980d0cc8e0f319fece43c23716ec126858936fea/auth/README.md?plain=1#L374-L376
That code seemed to be in parity with this documentation - see sources in snippets-android
repo: Kotlin, Java. And in fact it is outdated as pointed out in https://stackoverflow.com/questions/58350107/firebase-ui-email-link-signin-intent-extra-is-null.
So checking intent extras should be replaced with just intent.getData().toString()
in all parts of related documentation. After doing this linter will warn about link
being non-nullable, so if (link != null)
check can be removed as well.
Email-link signin was not working in my app when the email link was clicked in the Outlook app. I traced it to this line in the official documentation, which doesn't seem to have a good reason to exist, AFAICT
https://github.com/firebase/FirebaseUI-Android/blame/master/auth/README.md#L297
For some reason, the gmail app does have extras in the intent but not the outlook app. In any case, that null check seems unnecessary: nothing in the sample code in the README derefences
getIntent().getExtras()
and moreover, everything works fine even when extras is null. Is this just outdated documentation?