-
Notifications
You must be signed in to change notification settings - Fork 292
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
CCT - AuthTab Sample Demo #486
base: main
Are you sure you want to change the base?
CCT - AuthTab Sample Demo #486
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
9372a90
to
843e9c7
Compare
Hi Erik, thanks for the PR! |
+1 to make a separate PR with build changes. |
Hi all, I can split this in to two PRs. I'll make this one specific to AuthTab and will create another for project updates. |
.build(); | ||
|
||
// Open the Authorization URI in a Chrome Custom Auth Tab. | ||
AuthTabIntent authTabIntent = new AuthTabIntent.Builder().build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that AuthView demo is almost identical to the Oauth demo, the difference are:
- New callback intent-filter
- Launcher intents are different
- Different result handling
I think that we can merge this demo into Oauth, as far as I can see it'd require:
- Add an AuthView callback intent-filter into the AndroidManifest
- Demo should provide a way to switch between CCT and AuthView. I think a checkbox and
shouldUseAuthView
should be enough. - In AuthManager launch intents and handle results based on
shouldUseAuthView
. - I'd also add comments why AuthView is preferable in AuthManager or even deprecate CCT flow at all.
This way we get rid of duplication and provide some kind of migration steps from CCT to AuthView.
What do you think?
This PR contains a working demo for an implementation of AuthTab for Chrome Custom Tabs for Android. The included project, custom-tabs-authview, uses the existing custom-tabs-oauth demo as a guide for authentication using a website, in this case Github.
Some notes: