Skip to content

Add Hedgedoc authentication#32

Closed
JJ-8 wants to merge 1 commit into
TFNS:mainfrom
JJ-8:feature/hedgedoc-auth
Closed

Add Hedgedoc authentication#32
JJ-8 wants to merge 1 commit into
TFNS:mainfrom
JJ-8:feature/hedgedoc-auth

Conversation

@JJ-8
Copy link
Copy Markdown
Collaborator

@JJ-8 JJ-8 commented Apr 3, 2021

When a new account is created, CTFNote now tries to register the user to Hedgedoc. After that, the user will be automatically authenticated to Hedgedoc when logging in. The slug and password of the user are used for registering.

Only new accounts are registered to Hedgedoc. However, on every log in CTFNote tries to authenticate the user to Hedgedoc. This does not cause an error.

The benefit of authenticating is that the cursor of the user shows the username/slug and changes by users are shown by Hedgedoc.

The slug is used instead of the username because the slug never changes for a user. If the username was used and it changes, then authentication will always fail on login.

This feature can be disabled by the env variable MD_AUTH.

No new URL is required, because the MD create url is used for building the URL.

When a new account is created, CTFNote now tries to register the user to
Hedgedoc. After that, the user will be automatically authenticated to
Hedgedoc when logging in.
The slug and password of the user are used for registering.

Only new accounts are registered to Hedgedoc. However, on every log in
CTFNote tries to authenticate the user to Hedgedoc. This does not cause
an error.

The benefit of authenticating is that the cursor of the user shows the
username/slug and changes by users are shown by Hedgedoc.

The slug is used instead of the username because the slug never changes
for a user. If the username was used and it changes, then authentication
will always fail on login.

This feature can be disabled by the env variable MD_AUTH.
@JJ-8
Copy link
Copy Markdown
Collaborator Author

JJ-8 commented Apr 4, 2021

You can register manually to the Hedgedoc instance with the correct email and same password used in CTFNote in order to make Hedgedoc authentication working for existing accounts.

@B-i-t-K
Copy link
Copy Markdown
Member

B-i-t-K commented Apr 6, 2021

Thats great ! we are working on a backend rework right now, but I will add this patch I think it's a cool feature

Thanks for the support!

JJ-8 pushed a commit to JJ-8/CTFNote that referenced this pull request May 31, 2021
When a new account is created, CTFNote now tries to register the user to Hedgedoc. After that, the user will be automatically authenticated to Hedgedoc when logging in. The slug and password of the user are used for registering.

The benefit of authenticating is that the cursor of the user shows the username and changes by users are shown by Hedgedoc.

No new URL is required, because the MD create url is used for building the URL.

Follow up of TFNS#32
@JJ-8
Copy link
Copy Markdown
Collaborator Author

JJ-8 commented May 31, 2021

Closed due to inactivity and follow up

@JJ-8 JJ-8 closed this May 31, 2021
JJ-8 added a commit to woutvanderploeg/CTFNote that referenced this pull request Jun 17, 2023
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.

2 participants