Skip to content

Add to CustomTabsOptions ability to disable opening auth in custom tab#806

Merged
pmathew92 merged 4 commits intoauth0:mainfrom
bennycao:main
Mar 6, 2025
Merged

Add to CustomTabsOptions ability to disable opening auth in custom tab#806
pmathew92 merged 4 commits intoauth0:mainfrom
bennycao:main

Conversation

@bennycao
Copy link
Copy Markdown
Contributor

@bennycao bennycao commented Mar 4, 2025

Changes

Add option in CustomTabsOptions to define a list of browser packages where you do not want to launch the authentication url in custom tab. This adds feature #805 to solve incompatible custom tab browser.

Please describe both what is changing and why this is important. Include:

  • create new method for CustomTabOptions builder withDisabledCustomTabsPackages to define list of custom tab packages to disable which assigns to new instance variable disabledCustomTabsPackages
  • update CustomTabOptions.toIntent to get preferredPackage which is the preferred browser package calculated by browser picker.
  • update CustomTabOptions.toIntent to validate if the preferredPackage is in the disabledCustomTabsPackages list, and if so, just return Intent with action of Intent.ACTION_VIEW only

References

solves feature #805

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. Since this library has unit testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds unit test coverage

  • This change adds integration test coverage

  • This change has been tested on the latest version of the platform/language or why not

Checklist

@bennycao bennycao marked this pull request as ready for review March 4, 2025 04:57
@bennycao bennycao requested a review from a team as a code owner March 4, 2025 04:57
@bennycao bennycao changed the title add withDisabledCustomTabsPackages option and validate when launching… Add withDisabledCustomTabsPackages option to CustomTabsOptions Mar 4, 2025
@bennycao bennycao changed the title Add withDisabledCustomTabsPackages option to CustomTabsOptions Add to CustomTabsOptions ability to disable opening auth in custom tab Mar 4, 2025
@pmathew92
Copy link
Copy Markdown
Contributor

Hi @bennycao ,
Thank you for raising this PR. Will review this

pmathew92
pmathew92 previously approved these changes Mar 6, 2025
Copy link
Copy Markdown
Contributor

@pmathew92 pmathew92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for raising this PR . Few minor changes .Please address them and we should be good to merge this

@bennycao
Copy link
Copy Markdown
Contributor Author

bennycao commented Mar 6, 2025

Hi @bennycao , Thank you for raising this PR. Will review this

@pmathew92 thank you, i've addressed most of your comments. Just one about extra lines which i'm not too sure about it

@pmathew92 pmathew92 merged commit f03048f into auth0:main Mar 6, 2025
9 checks passed
@pmathew92 pmathew92 mentioned this pull request Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants