Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.3.0-dev #73

Merged
merged 1 commit into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ docs
config/config.json
package-withSequelize.json

temp/

#Sequelise Temporary Ignore list
models/
config/
migrations/
src/helpers/api/installSequelize.ts
src/helpers/installation.ts
src/helpers/models.ts
.sequelizerc
# models/
# config/
# migrations/
# src/helpers/api/installSequelize.ts
# src/helpers/installation.ts
# src/helpers/models.ts
# .sequelizerc
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ COMBINEDCOMMITMESSAGE
config/config.json
package-withSequelize.json


temp/
#Sequelise Temporary Ignore list
models/
config/
migrations/
src/helpers/api/installSequelize.ts
src/helpers/installation.ts
src/helpers/models.ts
.sequelizerc
# models/
# config/
# migrations/
# src/helpers/api/installSequelize.ts
# src/helpers/installation.ts
# src/helpers/models.ts
# .sequelizerc
7 changes: 7 additions & 0 deletions .sequelizerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const path = require('path');

module.exports = {
env: process.env.NODE_ENV,
'config': path.resolve('config', 'config.js'),

}
9 changes: 9 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
v0.3.0-dev
- Version bumped to 0.3.0
- NextAuth.js Introduced
- OAuth now works with MMDL!
- Supports Keycloak, Google, Authentik out of the box. The rest (those supported by NextAuth.js) can be added manually by the user.
- Sequelize formally introduced
- Models and migrations generated
- Bug fixes

v0.1.9
- Removed Fullcalendar script import from _app.js
- Looks like calendar view works without it.
Expand Down
11 changes: 8 additions & 3 deletions COMMITMESSAGE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
admin/getusers API Changes
- Added dev dependencies to make cypress work.
- Added eslint dependencies
v0.3.0-dev
- Version bumped to 0.3.0
- NextAuth.js Introduced
- OAuth now works with MMDL!
- Supports Keycloak, Google, Authentik out of the box. The rest (those supported by NextAuth.js) can be added manually by the user.
- Sequelize formally introduced
- Models and migrations generated
- Bug fixes
27 changes: 27 additions & 0 deletions config/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const dotenv = require('dotenv')
dotenv.config({ path: `.env.local`, override: true });
module.exports = {
local: {
username: process.env.DB_USER,
password: process.env.DB_PASS,
database: process.env.DB_NAME,
host: process.env.DB_HOST,
port: 3306,
dialect: "mysql"
},
test: {
username: "root",
password: null,
database: "database_test",
host: "127.0.0.1",
dialect: "mysql"
},
production: {
username: "root",
password: null,
database: "database_production",
host: "127.0.0.1",
dialect: "mysql"
}
}

48 changes: 48 additions & 0 deletions config/nextAuthProviders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import KeycloakProvider from "next-auth/providers/keycloak";
import GoogleProvider from 'next-auth/providers/google'
import AuthentikProvider from 'next-auth/providers/authentik'
import { varNotEmpty } from "@/helpers/general";

/**
* Array of authProviders that will be passed to NextAuth.js
*/
const authProviders = []

/**
* Add KeyCloak if parameters are defined.
*/
if(varNotEmpty(process.env.KEYCLOAK_CLIENT_ID) && varNotEmpty(process.env.KEYCLOAK_ISSUER_URL) && varNotEmpty(process.env.KEYCLOAK_CLIENT_SECRET)){
authProviders.push(
KeycloakProvider({
clientId: process.env.KEYCLOAK_CLIENT_ID,
issuer: process.env.KEYCLOAK_ISSUER_URL,
clientSecret: process.env.KEYCLOAK_CLIENT_SECRET
}),
)
}

/**
* Add Google Provider if parameters are defined.
*/
if(varNotEmpty(process.env.GOOGLE_CLIENT_ID) && varNotEmpty(process.env.GOOGLE_CLIENT_SECRET) ){
authProviders.push(
GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET
})
)
}
/**
* Add Authentik Provider if parameters are defined.
*/
if(varNotEmpty(process.env.AUTHENTIK_CLIENT_ID) && varNotEmpty(process.env.AUTHENTIK_CLIENT_SECRET) && varNotEmpty(process.env.AUTHENTIK_ISSUER)){

authProviders.push(
AuthentikProvider({
clientId: process.env.AUTHENTIK_CLIENT_ID,
clientSecret: process.env.AUTHENTIK_CLIENT_SECRET,
issuer: process.env.AUTHENTIK_ISSUER,
})
)
}
export default authProviders
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cypress/videos/install.cy.ts.mp4
Binary file not shown.
Loading