hotosm / fmtm

Field Mapping Tasking Manager - coordinated field mapping.
https://fmtm.hotosm.org/
GNU Affero General Public License v3.0
48 stars 46 forks source link

Backend: Inviting Users through username or email #1199

Open manjitapandey opened 9 months ago

manjitapandey commented 9 months ago

Is your feature request related to a problem? Please describe. I should be able to invite users through emails. This feature should be added to manage project page by clicking on invite users. The new users will be invited adding username or email.

Additional context The backend task to invite user should be created.

spwoodcock commented 9 months ago

This is tricky as we don't use emails for login, we use OSM credentials. OSM does not provide the email address of the user from their API.

Two options I can think of:

Via OSM Message

Verify user exists

Invite

EDIT this approach will not work due to cross site scripting restrictions, duh! The only way would be via an API, which OSM is in the process of implementing.

Notification

Caveats

Via Email

Note this requires adding an email service to FMTM, which we don't have currently, but will probably add.

Invite

Email

I added this to the agenda for our next meeting to discuss.

spwoodcock commented 9 months ago

Looking into it, I think sending a message via OSM also notifies the user via email!

So that could be the perfect solution - as long as the user has their email up to date in openstreemap 😄

The emails look like this:

image

spwoodcock commented 9 months ago

Also of note, there is a proposal to make a proper API for OSM messages: https://wiki.openstreetmap.org/wiki/Messaging_API_proposal

spwoodcock commented 7 months ago

Blocked by #1192

We won't go ahead with the idea above as it's very OSM-centric. We need more flexibility.

spwoodcock commented 5 months ago

Reconsidered this after updates and team calls!

spwoodcock commented 3 months ago

Unblocked by Messages API finally being merged!

https://github.com/openstreetmap/openstreetmap-website/issues/4509