Link to OSM account missing

Currently there doesn鈥檛 seem to be a link to an users OSM account anywhere I checked, that is including the users profile. Obviously is is just a matter of C&P and typing the OSM user url in, but it would be clearly more convenient to have the link somewhere easily accessible.

7 Likes

We can enable custom profile fields but I鈥檓 not sure if we can auto-populate them with info from the account or the OSM API.

@TomH and/or @Firefishy might know better in terms of oauth2 data.

1 Like

I doubt this can be easily achieved. The oauth2 basic plugin extracts a predefined set of fields from the osm api user details endpoint (discourse-oauth2-basic/plugin.rb at main 路 discourse/discourse-oauth2-basic 路 GitHub). There鈥檚 some extra fields a few lines further down in the source code, not sure if/how they work.

Besides, the osm api endpoint doesn鈥檛 return an url pointing to the user profile at this time, meaning you would have to manually assemble the proper url on discourse side based on the display_name info. After all, this might be the bigger challenge here.

By the way, neither osqa nor fluxbb have this feature atm, so it鈥檚 more of an enhancement request really and not something that is missing.

2 Likes

Adding the profile URL to the API endpoint would not be a major issue though unless Discourse could be persuaded to force update it in the way it does other fields there would be a synchronisation issue.

Andy has a plan to enable profile URLs with numeric IDs which would resolve that issue of course.

3 Likes

Regarding the extra / custom attributes: I found a pull request covering the additional logic on oauth2 basic plugin side: FEATURE: Fetch custom attributes from the user details. by romanrizzi 路 Pull Request #47 路 discourse/discourse-oauth2-basic 路 GitHub

          custom_path = 'account.custom_attr'
          DiscoursePluginRegistry.register_oauth2_basic_additional_json_path(
            custom_path,
            Plugin::Instance.new
          )
1 Like

It seems other person asked long ago about extracting more fields from the oauth2, maybe we can bump that question

1 Like

Right now, my 鈥渦ser summary鈥 seems to be https://community.openstreetmap.org/u/someoneelse/summary. The corresponding OSM account is https://www.openstreetmap.org/user/SomeoneElse. Is it possible to have something at the 鈥渦ser summary鈥 in Discourse that links through? Preferably something automatic, but manual would do (and https://community.openstreetmap.org/u/SomeoneElse/summary does not appear to be editable - which sure just means that I鈥檝e missed the button somewhere).

In some cases it鈥檚 鈥渙bvious鈥 - the name will be exactly the same, but with me the account differs by case, and https://www.openstreetmap.org/user/someoneelse does not exist.

@SomeoneElse moved you to the existing conversation/request

In Preferences > Profile, I used the website field to link to my OSM Wiki profile, I would suggest until a better solution is made, people could do the same but link to their OSM Profile link if they wish.

I also utilize Markdown in the About Me box, which ends up looking like;

So there鈥檚 a couple of ways of doing it in the interim. :slightly_smiling_face:

2 Likes

2 posts were split to a new topic: Changing OSM username doesn鈥檛 change here

Case in hand: I need to check the edits of the creator ov this thread Is it allowed to add custom namespace/tags for specific project?

1 Like

Valid point, Discourse OAuth2 plugin stores the user.id returned by the OSM API, but that value isn鈥檛 exposed anywhere on the UI. Needs more research.

Ok, I found it using Who's That - OSM User Names Database

User name had some spaces in there, and Discourse would convert them into underscore characters.