Feature suggestion: login with an account from other websites (e.g. Mastodon, GitHub, etc.)

Hey @paddatrapper, we’d love to help you get your instance running! We actually have core OAuth support in WriteFreely today (to be released in v0.12), currently with Write.as and Slack as providers. We’d just need to add support for Gitlab.

I’m not sure when we’ll be able to get to this, but in the meantime, we’d be more than happy to review and merge support for Gitlab if you’re interested in implementing it. It should be pretty straightforward overall, using what we already have today. @ngerakines developed everything, but from my understanding the process would be:

  • Add a new configuration section similar to WriteAsOauthCfg
  • Copying oauth_writeas.go as a starting place, create similar methods for Gitlab, using configured values
  • Add a new func similar to configureWriteAsOauth()
  • Call that new func in routes.go
  • Add a “Login with Gitlab” button in login.tmpl
  • [Edit] Add account management:
    • Include Gitlab logo in static/img/mark/ directory
    • Add logo + buttons to user’s Account Settings page (settings.tmpl) – under both “Linked Accounts” and “Link External Accounts”
  • Configure your WF instance for Debian Salsa, and you should be able to log in!

If you want to go that route, please feel free to start a new #development topic and we can help or answer questions along the way.

Otherwise, thanks for your input! And we’ll add Gitlab support to our list of priorities.

1 Like