Skip to content

143 osm auth#383

Merged
mradamcox merged 19 commits into
mainfrom
143_osm_auth
May 28, 2026
Merged

143 osm auth#383
mradamcox merged 19 commits into
mainfrom
143_osm_auth

Conversation

@mradamcox
Copy link
Copy Markdown
Member

This PR introduces the ability to link a 3rd-party authentication provider with an existing OIM account, or to sign up through an external 3rd-party provider. For now, OpenStreetMap is the only provider supported, but by using the allauth application it should be quite easy to configure new providers.

The main work in this PR involved an update to the entire user interface side of account and profile management by reverting to the default allauth template patterns, and removing the existing sign up/sign in workflow that was handled through a custom modal.

Changing the existing flow via modal to a simpler template-based setup

A single modal was used for sign in or sign up, and when the form was submitted, the current page would reload with the user signed in.

image image

I really liked this set up (I replicated it from GeoNode's approach) because it is sleek and streamlined. However, with the addition of 3rd-party providers, which requires more forms and buttons and things, as well as the open ticket #354, I decided it would be best to simplify the setup and remove this custom modal, in favor of a flow that simply follows what allauth's templates support by default

image

Also, the next= url parameter will redirect to whatever page the sign in form was entered from, so nothing should really be lost from a usability standpoint.

User account vs. public profile

This update also introduces a distinction between a user's public profile, which anyone can see and displays the user's activity log, and a user's account, within which they can manage their email address, change password, change profile pic, and (now) connect to 3rd-party authentication providers.

Profile page now has a link to manage your account when you are signed in:

image

Account management page has different tabs for different actions (this follows default allauth templates, updated to fit the site theme):

image

This setup also sets the stage for a new "preferences" section will be helpful for #232 and related requests.

3rd-party provider functionality

Users can now elect to create a new account "via" their OpenStreetMap account during the sign up process. What really happens if you chose that you are sent to authenticate your OSM account (to prove that you are you) and then you are sent back to OIM for the completion of your OIM account. Your username will be prepopulated with your OSM username, and you'll still need to enter an e-mail address. You do not set a password, though you can later, if you want.

To link an existing account to OpenStreetMap, just sign into your OIM account and go to the Account Connections tab. Click the OpenStreetMap icon and follow the prompts.

When you create a linkage to OpenStreetMap, you'll authorize OldInsuranceMaps.net to have limited permissions on your OSM account. OIM never gets access to your OSM password and cannot make edits to OSM on your behalf--these permissions only allow for authorization.
image

To remove a connection to OpenStreetMap you will need to do two things:

  1. In your OIM account (https://oldinsurancemaps.net/account/), go to Account Connections, select the OSM connection and click remove.
  2. Next go to your OpenStreetMap account (https://www.openstreetmap.org/account), go to OAuth 2 Authorizations and Revoke Access for the OldInsuranceMaps.net entry.

Funded by OpenHistoricalMap

@Juliansilver
Copy link
Copy Markdown

Awesome!!

@mradamcox mradamcox merged commit 338656a into main May 28, 2026
1 check passed
@mradamcox mradamcox deleted the 143_osm_auth branch May 28, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] User signup silently fails with redirect [Request] Add social login through OpenStreetMap

2 participants