1
0
Fork
You've already forked postgres-project-template
0

database-driven authentication with policy in DB #1

Open
Grauwolf wants to merge 2 commits from db-driven-auth into alpha
pull from: db-driven-auth
merge into: Grauwolf:alpha
Grauwolf:alpha
Grauwolf:email-templating

This branch shows the monolithic approach where user_login() handles:

  • password verification
  • account locking (5 attempts = 15 min lockout)
  • session creation (7 day expiration)
  • failed attempt tracking

All policy decisions are in the database function. Easier to call from application (single function) but harder to change policies without migrations/running sql.

This branch shows the monolithic approach where user_login() handles: - password verification - account locking (5 attempts = 15 min lockout) - session creation (7 day expiration) - failed attempt tracking All policy decisions are in the database function. Easier to call from application (single function) but harder to change policies without migrations/running sql.
This pull request has changes conflicting with the target branch.
  • database/functions/user.sql
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin db-driven-auth:db-driven-auth
git switch db-driven-auth

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch alpha
git merge --no-ff db-driven-auth
git switch db-driven-auth
git rebase alpha
git switch alpha
git merge --ff-only db-driven-auth
git switch db-driven-auth
git rebase alpha
git switch alpha
git merge --no-ff db-driven-auth
git switch alpha
git merge --squash db-driven-auth
git switch alpha
git merge --ff-only db-driven-auth
git switch alpha
git merge db-driven-auth
git push origin alpha
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Grauwolf/postgres-project-template!1
Reference in a new issue
Grauwolf/postgres-project-template
No description provided.
Delete branch "db-driven-auth"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?