Skip to content

Added an optional OAUTH_ALLOWED_ROLES environment variable#1463

Open
JimKnoxx wants to merge 2 commits intogetfider:mainfrom
JimKnoxx:oauth-allowed-roles
Open

Added an optional OAUTH_ALLOWED_ROLES environment variable#1463
JimKnoxx wants to merge 2 commits intogetfider:mainfrom
JimKnoxx:oauth-allowed-roles

Conversation

@JimKnoxx
Copy link
Contributor

@JimKnoxx JimKnoxx commented Feb 25, 2026

  • Setting this prevents users without the specified roles from accessing the Fider instance

We use Fider in a private instance with OAUTH as only login method.
We only want some users (teachers and admins) to access the instance.
At the moment we can only use "obscurity" measurements to prevent students from accessing.

In this PR I (and Claude), added the OAUTH_ALLOWED_ROLES .env variable, a way to filter out the roles from the oauth json response of a user and perform access checks based on the roles that the user has.

Issue: #1464

Generated with Claude Code

- Setting this prevents users without the specified roles from accessing the Fider instance

Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
@JimKnoxx JimKnoxx force-pushed the oauth-allowed-roles branch from 5d971d7 to 015c03d Compare February 25, 2026 15:10
@JimKnoxx JimKnoxx changed the title Added the optional oauth allowed roles environment variable Added an optional OAUTH:allowed roles environment variable Feb 25, 2026
@JimKnoxx JimKnoxx changed the title Added an optional OAUTH:allowed roles environment variable Added an optional OAUTH_ALLOWED_ROLES environment variable Feb 25, 2026
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.

1 participant