Gerben321 / bike-care-tracker

Issue/Suggestion tracker for Bike Care app
3 stars 0 forks source link

Issues with recurring when connecting with Strava #6

Closed OleksiyRudenko closed 4 months ago

OleksiyRudenko commented 4 months ago

Describe the bug Context: I was connected with Strava before, so having an account with the BikeCare already setup. Today's experience ends in inability to login to BikeCare using Connect with Strava feature, resulting in error.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://bikecare.gerbenbol.com/
  2. Click on Connect with Strava and get redirected to Strava
  3. Click Authorize at Strava (all permissions are checked) and get redirected back to BikeCare, page https://bikecare.gerbenbol.com/dashboard/login
  4. See error Something went wrong... on the page (see screenshot below)

On Android v13 Chrome browser same STR results in:

  1. Click Authorize at Strava (all permissions are checked) and get redirected back to BikeCare, page https://bikecare.gerbenbol.com/strava-login?state=e27d07967e0992625231d5ea25e3d736&code=a46692a0848dcc80e4d37acfe75d9c978f6db4bb&scope=read,activity:read_all,profile:read_all,read_all
  2. See error Invalid state on an empty page (see screenshot below)

Expected behavior BikeCare dashboard

Screenshots Desktop

Mobile

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

Gerben321 commented 4 months ago

Sorry about that. Will try to have a look at that tonight. I'm using the form to login which is something I want to enable for other people aswell.

But this should also work of course, and the app should stay logged in longer. I'll let you know when it's fixed.

OleksiyRudenko commented 4 months ago

@Gerben321 thank you for looking into this. It works for me now on desktop. Weirdly, on Android Chrome the issue persists.

Gerben321 commented 4 months ago

Seems like this was introduced after some changes earlier today. I fixed one error, but indeed the 'invalid state' is still present. Now looking what's wrong with that. I'll let you know when there's news.

Gerben321 commented 4 months ago

@OleksiyRudenko Should be fixed now. Maybe the Strava screen pops up twice, will try to fix that as well. But you should get in again on all devices. You should also be logged in for longer now.

Gerben321 commented 4 months ago

Seems like the issue is that the browser is somehow caching a URL. So that explains the different behaviour in different browsers. It's working fine for me in private mode, while I get the cached Strava login URL on my normal browser mode. Gonna have to look if that's something I can disable.

Gerben321 commented 4 months ago

Should be fixed now if you try again. I've added a random hash to the big orange Strava button to make sure it's not cached. Let me know if it fixes it for you on all your devices.

OleksiyRudenko commented 4 months ago

@Gerben321 tested. Was stuck on Strava authorization page, i.e. clicking on Authorize didn't actually redirect back to BikeCare. After several attempts it let me through. As a result, I am successfully logged in on BikeCare and logged-in state persists/survives page reload. I'd consider it resolved until the issue reoccurs. Thank you

Gerben321 commented 4 months ago

Little false alarm about remaining logged in, wasn't fully working. If you log out and login again now, you will stay logged in for a month.