Skip to content

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

@momomomo111

Description

@momomomo111

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions