Git-point: Github's Authorize Button Disabled in Android WebView

Created on 20 Dec 2017  路  29Comments  路  Source: gitpoint/git-point

| Question | Response |
| ---------------- | ----------- |
| Version? | v1.4.1 |
| Devices tested? | Xiaomi Mi 4 - Android 5.0|


What Currently Happens?

Upon logging in, the inbuilt browser showcases a Github auth page with the green button (Authorize) disabled.


This problem is encountered only when the sign-in flow is interrupted due to some user circumstances. For example, if you download the app for the first time and click sign-in, it will take you to the Github Auth page where you can enter your details to allow git-point to access your profile/repo. Once you successfully sign in, Github asks you to allow the app the required permissions. At this point, the green button is working (if this is a fresh sign-in attempt) and the cancel button is disabled so the user cannot break the flow. However, due to external circumstances, like a phone call or if the user closes the app or anything else, the sign-in process in broken in between. User has already signed in to the Github web page but hasn't authorized the GitPoint app yet. Now when the user reopens the app and tries to sign in, he is directly taken to the authorization page (permission page where he left last time). He is asked to allow the app to access its profile, etc. And at this time the green button (authorize button) is disabled. It shall be noted that scrolling and normal tapping is still enabled. ONLY the authorize button is disabled.

What Do You Expect To Happen?

Green button to be enabled.

My Reproduction Steps

Mentioned above.

  1. Try sign-in for the first time
  2. Enter credentials. Don't approve the app though.
  3. Close the app (don't authorize the app yet)
  4. Reopen the app and try to sign-in

My personal view of what is happening -
Since the android WebView saves the cache/cookies therefore the app picks up from the last point where the user left the signin process on the github page (that is why user doesn't need to sign in). However, the javascript seems to be disabled which disables the green button. I have only checked it in Android.



bug android has pr

Most helpful comment

Lool after I struggled for years.. I have found a Solution to This
The course is. First I use my google chrome which I saved my Github account with.
So my VS was taking me to Microsoft Edge and get the button disabled.

All you have to do is to change you Default browser on your machine to the one u have signed is with on github

All 29 comments

I think this is the same as #680 and is addressed by #681
Leaving this open for the wonderful details, thank you @pallavbakshi !

Ha ha! I came first though (Mine issue is 674). Fun aside, I will test it and close the issue if it is fixed. However, it will take me some time to test it. Thanks :D

hahahaha, you just reminded me when I told my grandpa older brother: "oh you look like grandpa" and he shouted at me "no, HE looks like ME" 馃ぃ

I think @housseindjirdeh will be providing a test APK shortly for #680, I'll make sure to notify you so that you can test as well. Thank you soo much!

@pallavbakshi here's the APK with the fix: https://github.com/gitpoint/git-point/releases/tag/hotfix

Please take as long as you need to give it a shot, there's definitely no rush :)

@housseindjirdeh Thanks! I will check it soon, hopefully.

This is still the case for me, while I use the default browser in BlackBerry OS 10.

Thank you for the feedback. We need to get rid of that WebView and use something like react-native-oauth..

Thanks a lot :D

I can open another issue, for the integration of react-native-oauth or the evaluation of alternatives?

What is most easy to integrate?

Fast Hub uses Tokens too:
https://github.com/k0shk0sh/FastHub#features

Please do! If you want to give it a shot, we'll gladly accept a PR too 馃槄

Ok, same news: Its in the auth app itself.

This issue happens to me on all different implementations.
And the auth on pages who offer both, Twitter and Github works for Twitter and not for Github.

@pallavbakshi could you remove the app and install https://idk.tn/gitpoint-test.apk ?

After clicking "Sign in" you should see a really ugly "Can't sign in?" button that will open the GitHub oAuth URL in your browser. Tell me if that works for you 馃檹

Hey hey!! @machour ... Sure I'll do so over this weekend. Thanks for your patience and hard work.

It's immediately disabled on iOS 9: it's unusable.

Hi @Mouvedia, this issue happens only on Android to my knowledge. Can you provide us with some more information about your device?

@machour iOS 9.3.5 iPhone 4S

@Mouvedia If the button is not clickable, it means that GitHub doesn't support your browser (we're using a WebView). But this seems odd.

Are you able to click the button on this link using Safari (Private Navigation): https://github.com/login/oauth/authorize?response_type=token&client_id=87c7f05700c052937cfb&redirect_uri=gitpoint://welcome&scope=user%20repo&state=foobar

@machour I cannot on my iPhone.

Can you provide a screenshot?

If you don't believe me that's fine by me.

Wow wow wow, you totally misunderstood my request pal :)

I asked if you were able to click the button directly in Safari, because Safari is used in our application in a webview, and I wanted to verify if our integration was faulty or not.

You said that you were unable to.

I asked for a screenshot of the page on Safari to see if I could spot any error that would help me understand the problem, and not in any way because I didn't believe you. Now can I have this screenshot or not ? :)

By the way, the URL I provided is using our dev client_id and may brake at any time.

There's nothing to see, just a disabled button. It's probably the same problem: you gotta enable javascript explicitly.

Should be enabled in Safari..

Please note that GitHub no longer supports old versions of Safari.

Indeed. Well in the meantime could you share the prod url as a workaround ?

I don't understand how you're gonna use it as you're reporting it doesn't work in Safari, but there you go: https://github.com/login/oauth/authorize?response_type=token&client_id=5f4e87fae2ea9d3d27c4&redirect_uri=gitpoint://welcome&scope=user%20repo&state=foobar

Well actually I managed to do it, here's the workaround:

  1. authorize yourself using the link in this comment
  2. click on this link this time from within safari on your iPhone and get redirected to the installed app
  3. end up on a frozen welcome page
  4. close the app
  5. reopen

@pallavbakshi sorry to bug you, but could you possibly confirm that https://idk.tn/gitpoint-test.apk works for you?

I'd love to ship the fix in a release soon 馃槃

Fixed.

Thank you so much @pallavbakshi 馃帀 馃帀

Lool after I struggled for years.. I have found a Solution to This
The course is. First I use my google chrome which I saved my Github account with.
So my VS was taking me to Microsoft Edge and get the button disabled.

All you have to do is to change you Default browser on your machine to the one u have signed is with on github

Was this page helpful?
0 / 5 - 0 ratings

Related issues

housseindjirdeh picture housseindjirdeh  路  3Comments

randy3k picture randy3k  路  5Comments

andrewda picture andrewda  路  4Comments

TautFlorian picture TautFlorian  路  4Comments

nikolaevigor picture nikolaevigor  路  3Comments