This is a module for Project Forge. It provides logins and session management for many OAuth providers.
https://github.com/kyleu/projectforge/tree/main/module/oauth
Licensed under CC0
- Provides OAuth sessions for the web UI
- By default, your project doesn't require any permissions or OAuth
- To enable OAuth, set environment variables as described in the setup page at
/admin/settings
- To enable permissions, add the following code to your
appInit
function:
// The first parameter indicates if all actions should be allowed by default
user.SetPermissions(false,
user.Perm("/admin", "github:projectforge.dev", true), // grant admin access to users signed into GitHub with an email domain ending in projectforge.dev
user.Perm("/admin", "*", false), // deny other users access to admin
user.Perm("/", "*", true), // allow all other traffic
)