firebase-android-sdk icon indicating copy to clipboard operation
firebase-android-sdk copied to clipboard

[firebase_auth]: Use AuthTabIntent (Auth Tab) by default for OAuth provider sign-in(via Custom Chrome Tab)

Open momomomo111 opened this issue 1 month ago • 1 comments

What feature would you like to see?

When FirebaseAuth.getInstance().startActivityForSignInWithProvider(...) launches a browser for an OAuth flow, it should use the AuthTabIntent API (from androidx.browser:browser) by default on supported devices.

Using AuthTabIntent provides a more secure, modern, and streamlined authentication experience, as recommended by the Chrome team: https://developer.chrome.com/docs/android/custom-tabs/guide-auth-tab

How would you use it?

This feature would be used automatically by the SDK. By adopting AuthTabIntent, Firebase Auth would provide several key benefits:

  1. Enhanced Security (Per the Documentation):

The AuthTabIntent API uses a modern ActivityResultLauncher callback instead of a traditional Intent to return the result.

This provides enhanced security by transferring data directly between the API and the app, reducing potential risks associated with intent handling.

  1. Streamlined User Experience (Per the Documentation):

The UI is minimal and focused purely on the authentication task.

Unnecessary browser features (like the share button, bookmarks, long-press menus, etc.) are removed, preventing user distraction.

momomomo111 avatar Nov 18 '25 01:11 momomomo111

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Nov 18 '25 01:11 google-oss-bot