Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom-tab-oauth demo: Chrome Custom Tab remains open with Oath redirect url instead of opening the MainActivity #274

Closed
cpjoshi opened this issue Mar 27, 2021 · 1 comment
Labels
wontfix This will not be worked on

Comments

@cpjoshi
Copy link

cpjoshi commented Mar 27, 2021

Read this First
If you have a Trusted Web Activity related question, the best place to ask it is on StackOverflow, on the
trusted-web-activity tag, which is also monitored by the team.

Describe the bug

  1. OAuth redirect is not working in the given example.
  2. custom-tab-oauth example is supposed to show how github oauth authentication can be done with Chrome Custom Tabs (CCT). But CCT never closes and control is never passed back to MainActivity

To Reproduce

  • Add the correct clientId and Secret for github OAuth client setup in code.
  • Start the application in AVD emulator.
  • MainActity opens.
  • Click on Login, CCT is opened and github login page is shown.
  • Login to github and complete the consent process.
  • After successful consent flow the CCT opens the redirect url: https://oauth-custom-tabs.glitch.me/oauth/auth-callback.html and stay here.

Expected behavior
Since the MainActivity has configured intent-filter filter OAuth callback url (https://oauth-custom-tabs.glitch.me/oauth/auth-callback.html), when github redirects to this URL, the MainActivity should open for further OAuth flow processing.

Did this ever used to work
n/a

Screenshots
image

Code Snippets
If applicable, add or link to code snippets describing how the API is being used.

Smartphone (please complete the following information):

  • Device: Pixel 2, API-29
  • OS: Android 10
  • Browsers Installed: Chrome
  • Browser Versions: 74.0.3729.185
  • android-browser-helper library version: Latest

Additional context
Add any other context about the problem here.

@andreban
Copy link
Member

Handling the callback relies on configuring App Links for the Android app and the callback origin, so it won't work unless you test it on your own origin and setup App Links.

@andreban andreban added the wontfix This will not be worked on label Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants