You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 3, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 3, 2026. It is now read-only.
American Red Cross user group has a user in the member list with no profile name #687
@Hagellach37:
this is a user who signed up with an OpenStreetMap account. for these users we get the username from OSM. but maybe we need to check how we store the OSM username.
@thenav56:
I poked around and looks like for the osm user have this attribute displayName in the firebase which the python-worker doesn't store or use. Quick fix will be to use the user_id if username is empty or not provided. And decide is we can use displayName for username and sync all existing users as well. For now, should we go for the quick fix?
@Hagellach37:
probable we don't set it properly for the users that log in with their osm account
basically we need to set it twice:
firebase authentication --> displayName
firebase realtime database --> username
can you confirm this @laurentS?
@laurentS:
yes, correct, firebase uses 2 different names as Benni mentioned above. When a users signs up with email/password, we copy their chosen username to both places (auth.displayName and db.username) but it looks like for OSM logins (it is difficult to know if the user had signed in with OSM before or not), we copy their displayName but maybe not their username https://github.com/mapswipe/python-mapswipe-workers/blob/master/firebase/functions/src/osm_auth.ts#L230
@laurentS:
you'd have to confirm this, but I suspect you may not have access to displayName if not authenticated as the user. If so, I'll have to figure out where to copy it to username so that you have access to it. It seems like an auth issue more than a problem with your stats
@danbjoseph:
this is on the open, community dashboard pages so the viewer will never be authenticated
@Hagellach37:
another insight about this. For users with OSM login we set the name as displayName in firebase database, but for users that sign up via email we set the name as username.
E.g. see here the differences:
The OSM usernames are currently not displayed in the dashboard because python-mapswipe-workers stores OSM usernames only in Firebase and not in the database. Although it is possible to store and save these usernames in the database, this approach will contradict with #678.
Quick Fix
We will show the osm id instead of User column for now with a hyperlink that redirects to the user profile.
We will show the osm id in the profile page if username is empty
Hey @Katbaloo. We are working on the fix and should be complete soon. It is an OSM name issue because OSM usernames are not stored in the database while MapSwipe account usernames are. We'll share more if we find any inconsistencies.
We have updated the logic to display the usernames in the User Group table and export. Now if a user's username is empty, then the user's ID will be shown. Screenshot of a test OSM user attached below. If more details are required, clicking on the ID will redirect to the user's profile.
do we have the actual osm username? instead of osm:* with the user id number?
for example if i create an account with my osm account i would want it to show danbjoseph and not osm:1535212 in the stats boards. in the app it does show my danbjoseph name after authorizing with OSM.
For the community dashboard, the actual OSM usernames are not stored in the postgres database. Maybe we can add it in future iteration of the python-mapswipe-workers. For the time being, instead of showing empty cells, we decided to at least show usernames.
Whereas, the app pulls data from Firebase where the username is stored.
All in all, we should definitely streamline the stats and data across platforms to make it consistent.
Activity
danbjoseph commentedon Apr 17, 2023
@Hagellach37:
this is a user who signed up with an OpenStreetMap account. for these users we get the username from OSM. but maybe we need to check how we store the OSM username.
@thenav56:
I poked around and looks like for the osm user have this attribute
displayNamein the firebase which the python-worker doesn't store or use. Quick fix will be to use theuser_idif username is empty or not provided. And decide is we can usedisplayNamefor username and sync all existing users as well. For now, should we go for the quick fix?@Hagellach37:
probable we don't set it properly for the users that log in with their osm account
basically we need to set it twice:
firebase authentication --> displayName
firebase realtime database --> username
can you confirm this @laurentS?
@laurentS:
yes, correct, firebase uses 2 different names as Benni mentioned above. When a users signs up with email/password, we copy their chosen username to both places (
auth.displayNameanddb.username) but it looks like for OSM logins (it is difficult to know if the user had signed in with OSM before or not), we copy their displayName but maybe not their username https://github.com/mapswipe/python-mapswipe-workers/blob/master/firebase/functions/src/osm_auth.ts#L230@laurentS:
you'd have to confirm this, but I suspect you may not have access to displayName if not authenticated as the user. If so, I'll have to figure out where to copy it to username so that you have access to it. It seems like an auth issue more than a problem with your stats
@danbjoseph:
this is on the open, community dashboard pages so the viewer will never be authenticated
@laurentS:
ok, I've added this to my todo list :)
@Hagellach37:
another insight about this. For users with OSM login we set the name as
displayNamein firebase database, but for users that sign up via email we set the name asusername.E.g. see here the differences:
I think this is what @thenav56 also said, but I didn't get it right in the first place. Good catch
kopitek8 commentedon Oct 22, 2024
@danbjoseph
Issue
https://community.mapswipe.org/user-group/-O7hKfEs6CcnzHVZ_V9b/
Findings
The OSM usernames are currently not displayed in the dashboard because
python-mapswipe-workersstores OSM usernames only in Firebase and not in the database. Although it is possible to store and save these usernames in the database, this approach will contradict with #678.Quick Fix
osm idinstead of User column for now with a hyperlink that redirects to the user profile.osm idin the profile page if username is emptyKatbaloo commentedon Oct 28, 2024
@kopitek8 any update on this? Still not clear if this is solely an OSM name issue, but given reports from our users, suspect not? Thanks!
kopitek8 commentedon Oct 29, 2024
Hey @Katbaloo. We are working on the fix and should be complete soon. It is an OSM name issue because OSM usernames are not stored in the database while MapSwipe account usernames are. We'll share more if we find any inconsistencies.
kopitek8 commentedon Oct 29, 2024
Solution
We have updated the logic to display the usernames in the User Group table and export. Now if a user's
usernameis empty, then the user's ID will be shown. Screenshot of a test OSM user attached below. If more details are required, clicking on the ID will redirect to the user's profile.User Group Members Table
Profile Page
danbjoseph commentedon Oct 30, 2024
do we have the actual osm username? instead of
osm:*with the user id number?for example if i create an account with my osm account i would want it to show
danbjosephand notosm:1535212in the stats boards. in the app it does show mydanbjosephname after authorizing with OSM.kopitek8 commentedon Nov 5, 2024
@danbjoseph
For the community dashboard, the actual OSM usernames are not stored in the postgres database. Maybe we can add it in future iteration of the python-mapswipe-workers. For the time being, instead of showing empty cells, we decided to at least show usernames.
Whereas, the app pulls data from Firebase where the username is stored.
All in all, we should definitely streamline the stats and data across platforms to make it consistent.