eduvpn / android

Android eduVPN application
https://play.google.com/store/apps/details?id=nl.eduvpn.app&hl=en
GNU General Public License v3.0
123 stars 45 forks source link

User gets redirected to 'New config' page from app #48

Closed sveeke closed 7 years ago

sveeke commented 7 years ago

@dzolnai @fkooman I don't know if this is a problem in the app or on the server, but you can figure that out together :).

There are multiple cases of people that are testing the app but get redirected to the wrong page. When they use the Development-instance (labrat.eduvpn.nl) they should login with SURFconext and then see the oauth approval screen. When they select 'Approve' they return to the app and can connnect to the configured profiles.

This actually does not work: people get redirected to the 'New Config' page instead of the oauth approval page. This is really confusing for them since they will download a file without knowing what to do next.

Any idea what can be wrong?

dzolnai commented 7 years ago

This actually does not work: people get redirected to the 'New Config' page instead of the oauth approval page. This is really confusing for them since they will download a file without knowing what to do next.

Can you describe these pages? There is no new config page in the app, so this happens in the browser? Does this mean that the browser does not open the app, but redirects to another page?

oauth approval page

What is this page?

Maybe some screenshots can help clarify the issue.

sveeke commented 7 years ago

Can you describe these pages? There is no new config page in the app, so this happens in the

browser? Does this mean that the browser does not open the app, but redirects to another page? It indeed happens in the browser, not in the app. It looks like the browser does not open the oauth-page but instead forwards the user to the create config page on the user-portal.

What is this page?

With my very limited knowlegde on this: when the token is being sent back to the user, oauth wants to make sure that the user approves. It does this by showing a screen where the user can approve or reject.

Maybe some screenshots can help clarify the issue.

screenshot_20161103-135828

The new-config screen I am talking about is this screen: https://labrat.eduvpn.nl/portal/new

dzolnai commented 7 years ago

Ok, seems like a server issue to me. Assigning @fkooman.

ghost commented 7 years ago

@sveeke: which version of the app? the one on http://145.100.180.98/app-debug.apk? For me it works fine with labrat...

Update: and can you reproduce it yourself?

sveeke commented 7 years ago

I had it only one time with an older version of the app, but two testers @ UT, student @ SURFnet and Rogier all had this problem with the latest version of the app. I already tried to reproduce it, but on my phone it seems to be working okay.

ghost commented 7 years ago

I am not sure what it could be then, and I am not sure how we can actually check that they run the latest version?

ghost commented 7 years ago

I uploaded the latest version now here: https://eduvpn.surfcloud.nl/eduvpn-20161027.apk

dzolnai commented 7 years ago

It is also possible that Firefox does not open the app from the URL. I tested it with the latest stable version and it seems to work for me correctly though.

sveeke commented 7 years ago

I encountered this bug only one time (a lot of app versions back) and that was on Chrome for Android. I can ask tomorrow which browser was used by the colleague that had this issue, maybe that helps a bit.

Are there any other ways of trouble shooting this issue? Five people have had this bug so far, so it's far too common.

sveeke commented 7 years ago

To add some more information: we think the bug only shows itself the first time a user installs and uses the eduVPN-app. Until now it is not reproducable after the first time the bug has occured, but when you flash the device it happens again.

efef commented 7 years ago

I installed eduvpn-20161109_01.apk on mij Nexus 7 2013 tablet in order to re-enact this issue. The way how I could re-enact is like this: -do the usual stuff, login via onegini (I always use a onegini local account and not social login), make sure the eduVPN is green and connected, then -disconnect wifi (so there is NO internet) -click disconnect -you'll see an Exclamation mark because the 'profiles' couldn't be loaded, turn WiFi ON again -go to your browser, close tabs, and remove all cookies in order disable active sesions -click on the Exclamation mark, choose 'log in' -choose identity provider Onegini and after filling-in name/password you'll get the webpage “your connected companies" (see screenshot 1) -when choosing 'back' in browser and forward again to onegini login I once got the "new" configuration webpage of eduVPN in chrome instead of returning back to the eduvpn app. See screenshot 2

Screenshot 1 screenshot_2016-11-10-12-31-39

Screenshot 2 screenshot_2016-11-10-12-33-06

dzolnai commented 7 years ago

Thank you for the reproduction steps, although it still works for me, even after deleting all Chrome data. From what I can see, this boils to down to something cookie related, where Onegini redirects to a different page if this is the first visit of the user maybe? Anyways, it seems this is a problem in the site itself instead of the app.

ghost commented 7 years ago

I was also unable to reproduce it using the Nexus 7 2013 all updates + factory reset.

ghost commented 7 years ago

I also got this Onegini issue at some point on iOS, just trying to login to the user portal, instead of redirecting back I went to the "companies" page. Maybe I clicked wrong, or maybe something is up with (certain) browsers and Onegini?

ghost commented 7 years ago

this is fixed now, the problem was related to obtaining an OAuth token for VOOT (group membership) on first login which triggered a redirect to the "/new" page. It only happened once.