Skip to content

Commit

Permalink
Merge pull request #1 from ghoshnirmalya/feat/add-authentication
Browse files Browse the repository at this point in the history
Add authentication using urql and NextAuth
  • Loading branch information
ghoshnirmalya authored Aug 27, 2020
2 parents ceb86cf + e907670 commit 24999cf
Show file tree
Hide file tree
Showing 59 changed files with 2,035 additions and 564 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
**/.DS_STORE
node_modules
**/node_modules
.next
**/.env
out
**/*.pem
.vercel
**/backend/data
**/.cache
backend/data
backend/build
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/controllers.html#core-controllers)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/models.html#lifecycle-hooks)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/services.html#core-services)
Expand Down
18 changes: 18 additions & 0 deletions backend/app/config/database.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = ({ env }) => ({
defaultConnection: "default",
connections: {
default: {
connector: "bookshelf",
settings: {
client: "postgres",
host: env("DATABASE_HOST", "postgres"),
port: env.int("DATABASE_PORT", 5432),
database: env("DATABASE_NAME", "strapi"),
username: env("DATABASE_USERNAME", "strapi"),
password: env("DATABASE_PASSWORD", "strapi"),
ssl: env.bool("DATABASE_SSL", false),
},
options: {},
},
},
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

/**
* An asynchronous bootstrap function that runs before
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

/**
* Cron config that gives you an opportunity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

module.exports = async (/* ctx */) => {
// return ctx.notFound('My custom message 404');
Expand Down
9 changes: 9 additions & 0 deletions backend/app/config/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = ({ env }) => ({
host: env("HOST", "0.0.0.0"),
port: env.int("PORT", 1337),
admin: {
auth: {
secret: env("ADMIN_JWT_SECRET", "f7a5d80a71f9c4960ff623b5f90056a0"),
},
},
});
File renamed without changes.
3 changes: 3 additions & 0 deletions backend/app/extensions/users-permissions/config/jwt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
jwtSecret: process.env.JWT_SECRET || "aa784526-bc31-4de1-8793-d334f862d2f4",
};
File renamed without changes.
4 changes: 2 additions & 2 deletions backend/package.json → backend/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {},
"dependencies": {
"knex": "<0.20.0",
"sqlite3": "latest",
"pg": "latest",
"strapi": "3.1.4",
"strapi-admin": "3.1.4",
"strapi-connector-bookshelf": "3.1.4",
Expand All @@ -28,7 +28,7 @@
"name": "A Strapi developer"
},
"strapi": {
"uuid": "ced9ba4d-b3cc-4352-9033-da423238fc2e"
"uuid": "60e015fd-285b-4506-9ff8-1abb4854f4da"
},
"engines": {
"node": ">=10.0.0",
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 24999cf

Please sign in to comment.