Chocobozzz / Chocobozzz/PeerTube

Add option to control new user registration in `userAuthenticated` method of `registerExternalAuth`

Open
#7,232 2 comments 0 reactions 0 assignees View on GitHub
Component: Auth Component: PeerTube Plugin :package: Type: Feature Request :sparkles:
Dominant language
TypeScript
Stars
15.3k
Forks
1.8k
Avg merge
8d 8h
Merged PRs (30d)
2

Description

### Describe the problem to be solved

Hi @Chocobozzz,

When using the `peertube-plugin-auth-openid-connect` for external authentication, new users are automatically registered if they do not already exist in the system.
However, I would like to prevent automatic registration and reject the authentication if the user is not pre-registered.

### Describe the solution you would like

I would like to have an option in the `userAuthenticated` method of `registerExternalAuth` that allows controlling whether new users can be automatically registered.
If a user is not already registered, the authentication should be rejected instead of creating a new account.
Furthermore, I want this registration control to be manageable from within the plugin itself.

I would greatly appreciate it if you could consider adding this feature. Thank you very much for your time and consideration.

Contributor guide

Open the contributing guide

Research direction

Start by locating the TypeScript implementation and API entry point for registerExternalAuth, especially the userAuthenticated method, and inspect how unknown users are handled. Add a plugin-manageable registration control that rejects unregistered users when disabled while preserving the current behavior when enabled, then verify both authentication paths with the project's relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.