Conversation
paskal
left a comment
There was a problem hiding this comment.
Thanks a ton! Tested this with GitHub OAuth endpoints on a live instance — works as expected. A few things:
-
built-in provider names aren't reserved (
server.go:1023). onlyemailandanonymousare blocked, butAUTH_CUSTOM_NAME=githuborAUTH_CUSTOM_NAME=telegramwould silently register a competing route. should add the full list:google,github,facebook,yandex,microsoft,patreon,discord,telegram,dev,apple. docs have the same gap — says "should not beemailoranonymous" but doesn't mention built-in provider names. -
user ID hashing uses SHA-256 (
server.go:1043) while all built-in providers use SHA-1. no comment explaining the choice. if intentional, add a note — otherwise it'll confuse anyone who switches from custom to a native provider later (IDs won't match, existing comments become disassociated). -
no happy-path test — only the partial-config error case is covered. worth adding a test that registers a fully configured custom provider and checks it appears in the provider list, similar to
TestServerApp_DevMode.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2006 +/- ##
==========================================
+ Coverage 62.17% 62.21% +0.03%
==========================================
Files 132 132
Lines 3035 3038 +3
Branches 769 772 +3
==========================================
+ Hits 1887 1890 +3
+ Misses 1144 1034 -110
- Partials 4 114 +110 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I was just checking the docs and was looking for this feature. I would like to authenticate users with Codeberg (Foregejo). I'll try to test a custom provider with https://remark42.com/docs/contributing/backend/ ... |
fix: reserve built-in custom provider names
|
I’ve addressed the review feedback:
Could you please take another look when you have time? Thanks! |
Custom OAuth2 integration on both frontend and backend.