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

start mapping button is not functional on mobile website and PWA #1393

Closed
manjitapandey opened this issue Mar 27, 2024 · 12 comments
Closed

start mapping button is not functional on mobile website and PWA #1393

manjitapandey opened this issue Mar 27, 2024 · 12 comments
Assignees
Labels
bug Something isn't working testing:ready Ready for testing

Comments

@manjitapandey
Copy link
Contributor

Describe the bug
I am unable to click on start mapping of any task on mobile. However it works on laptop.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'project page'
  2. Click on 'any task'
  3. Click on "start mapping"
  4. See error

Expected behavior
The status of task should be changed to locked for mapping.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [Oppo F19 pro]
  • Browser [Chrome]
@manjitapandey manjitapandey added the bug Something isn't working label Mar 27, 2024
@spwoodcock
Copy link
Member

Hmm, is this dev stage or prod?

@manjitapandey
Copy link
Contributor Author

It was replicable on all servers. Seems like this issue is there when users aren't logged in.
The solution could be either allowing user to lock task without logging in or redirecting them to log in page.

@spwoodcock
Copy link
Member

For now can we allow locking and unlocking without log in? @Sujanadh

@Sujanadh
Copy link
Collaborator

For now can we allow locking and unlocking without log in? @Sujanadh

okay but how do we track who updated the status?

@spwoodcock
Copy link
Member

Good question!

We either don't provide the info of who updated & allow unauthenticated access, or provide a basic API for a simple type of auth.

We talked about email based auth being an option, but it would be very nice if we don't even need an email address!

What do you think about us having a temporary login token option, valid for one week?

The token would have restricted access to only view projects and update task status.

The user could provide their name in an input field, and the API will generate and return a token in a cookie.
This token will behave like the OSM cookie, but only be valid for one week

Open to other ideas too!

@Sujanadh
Copy link
Collaborator

It sounds good to me

@Sujanadh
Copy link
Collaborator

what about using jwt ? or are we saving token in database for basic authentication?

@spwoodcock
Copy link
Member

Yep we should!

OSM login is actually JWT based login, but implemented to never expire 😅

I was thinking an easy approach could be to just use the svcfmtm user.

We include the token from that user as an environment variable in the container startup.

Then for the 'temp login token' functionality, we could just create a cookie with that value that expires in a week.

With this approach the only thing I didn't work out is handling private projects, as we need to link an actual user to the project for mapper permissions to work. Open to ideas!

@Sujanadh
Copy link
Collaborator

Sujanadh commented Apr 1, 2024

saving user info wont be possible unless we create a separate table for that. if it is temporary approach then we don't have to think much on saving user data. Using svcfmtm might be good as you mentioned.

@spwoodcock
Copy link
Member

I think it's the way to go for now then 👍

We can work out how to link to private projects later.

One idea:

  • The temp tokens can be granted by the project admin, where they enter an email address.
  • Then a link is sent to the user.
  • When they click a link in the email it sets a temp cookie via the API.

@manjitapandey manjitapandey added the testing:ready Ready for testing label Apr 18, 2024
@manjitapandey
Copy link
Contributor Author

I am unable to test this since. the project area is not visible in mobile.

Record_2024-04-24-13-24-20.mp4

@spwoodcock
Copy link
Member

spwoodcock commented May 26, 2024

This should be testable now for release 2023.03 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working testing:ready Ready for testing
Projects
Development

No branches or pull requests

4 participants