Member SSO Provider (OAuth2/OIDC)#617
Draft
krestenlaust wants to merge 60 commits into
Draft
Conversation
Simply validates username
Also change authentication backend to use otp
- Move stylesheet into separate file - Make scopes a paramter for helper method
Credit to @mikkokupsu in django-oauth/django-oauth-toolkit#1663 (comment) Now only uses upstream library
CI now generates RSA key and passes it as environment variable
krestenlaust
added a commit
to f-klubben/fappen
that referenced
this pull request
Mar 1, 2026
Tested OK with f-klubben/stregsystemet#617
d77484c to
f71a422
Compare
- Backend ONLY validates now - View contains OTP gen-logic - Remove old tests, add new tests that test form - Reduce login.html template
Member
Author
The user wasn't authenticated properly, because the wrong backend was specified, so it just kept returning to the login page
It looks weird to a technical user that the get parameter disappears after first login
8 tasks
Member
Author
|
Remember to add these checks to login |
krestenlaust
added a commit
that referenced
this pull request
Apr 3, 2026
All changes made in #617 that are strictly related to login (no OIDC)
Member
Author
|
Extracted all login details into separate PR to make it more clean. This one will have to wait for that to be merged into main: #637 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This PR adds
How does it authenticate a member?
Whenever a Member logs in using the new login form (
/ffo/login), a companion non-staff user is added, and a reference to the user is added to the member.This user is then authenticated with requests, the same way django normally handles user logins.
How does it look on an external service?

Example buttons:
To-do:
roles-claim to signal whether a user is 'staff' or notgroups-claim and embed all user groupsoidc.key, make sure you can start a dev env without itRelated:
login_urldjango-oauth/django-oauth-toolkit#1663(currently solved in fork)Solved using custom login view