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

Add authorization function before every crud operation #6

Closed
rutu363 opened this issue Sep 7, 2020 · 4 comments · Fixed by #7
Closed

Add authorization function before every crud operation #6

rutu363 opened this issue Sep 7, 2020 · 4 comments · Fixed by #7
Assignees
Labels
enhancement New feature or request

Comments

@rutu363
Copy link
Collaborator

rutu363 commented Sep 7, 2020

Call requireauth function before crud so that only authorized user can access them.

@rutu363 rutu363 added the enhancement New feature or request label Sep 7, 2020
@tanmayc07
Copy link
Owner

tanmayc07 commented Sep 7, 2020

Can you add the reference to that function here? Are you talking about this link?

@rutu363
Copy link
Collaborator Author

rutu363 commented Sep 7, 2020

Yes that link , you can see this example in app.js
app.get("/home", requireAuth, (req, res) => {
res.json("LOGGED IN");
});

@tanmayc07
Copy link
Owner

Okay I'm on it!

@rutu363
Copy link
Collaborator Author

rutu363 commented Sep 7, 2020

Done !!

@rutu363 rutu363 closed this as completed Sep 7, 2020
tanmayc07 added a commit that referenced this issue Sep 7, 2020
👽 Add auth middleware for every blog crud operation #6
@tanmayc07 tanmayc07 linked a pull request Sep 9, 2020 that will close this issue
tanmayc07 added a commit that referenced this issue Nov 1, 2020
* Test commit for sahildev

* test commit for rutudev

* Initial test commit for tanmaydev

* Test commit

* 💩 add authentication

* 🗃️ Add scripts for /create and /list of blogs

* 🗃️ Add scripts for /update and /delete of blogs

* ➕ Add body-parser dependency

* added landing login reg pages

* 💄 Add create view

* 🚧 Add create and landing view and backend code

* 💫 Add logo

* Merge rutudev

* 🎨 Structure blog routes

* 🚚 Restructure auth routes #4

* 🚚 Restructure auth routes #4

* 🚚 Restructure auth routes #4

* 👽 Add auth middleware for every blog crud operation #6

* 🗃️ Resolve deprecation warning

* ✅ correct auth middleware

* 💄 Change in Register and login page #5

* 🗃️ Generalize database name #10

* 🐛 Login bug resolve

* 💄 Add tui editor in create view #3

* 🔧 password validate

* 💩 Add script for create blog

* 🚧 validations

* ✨ Update create blog script

* 🚧 validations

* 🍻 Done validations #15 #12

* ✨ Render Blog on seperate route

* ✨ Implement back button #18

* 📱 Login view and validations

* 🔥 Remove a temporary file

* 🐛 Fix UI bugs #18 #21

* 🐛 Fix footer in log and reg #21

* commit

* 💄 Connect landing to auth pages

* 💄 Error message styling in auth pages #28

* ✨ Add partial views for blog cards #2

* 🐛 Fix route and changed file name #30

* ✨ Add explore page

* Changes Logout #32

* ⚡ redirects

* 💩 Connect user and blog

* Connect user and blog schemas

* Iss33 (#36)

* 📝 Add cover image and badges #33

* 📝 Add steps to run locally #33

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* ♻️ Remove typo

* 🐛 Fix login and redirect page bug

* ⚡ Secret in .env

* ♻️ Remove comments and extra code #37

* 🗃️ Add author field in blogSchema

* 💄 Add author name on card #42

* ♻️  Redirect to explore after login

* ✨ Explore page patch

* ✨ Add functionality to create button

* ✅ myblogs #45

* 🔨 removes myblog test #45

* ✨ Frontend my blogs #50

* 💄 update ui for frontend myblogs #50

* ✨ Add edit and delete functionality to blogs

* 👽 Integrate mailchimp

* ⚡ adds 404 page

* ✨ Add navbar dropdown and avatar #55

* ➕ Add migrate-mongo dependency

* 📝 Update documentation

* 🐛 Patch

* ♻️ Refactor API to get latest blogs first

* 🔒 Add DB_URI in env

Co-authored-by: sahilambre <sahilws111@gmail.com>
Co-authored-by: Rutu <barve.rutu@gmail.com>
Co-authored-by: Rutu <62687761+rutu363@users.noreply.github.com>
Co-authored-by: Sahil Ambre <59484827+sahilambre@users.noreply.github.com>
tanmayc07 added a commit that referenced this issue Nov 22, 2020
* Test commit for sahildev

* test commit for rutudev

* Initial test commit for tanmaydev

* Test commit

* 💩 add authentication

* 🗃️ Add scripts for /create and /list of blogs

* 🗃️ Add scripts for /update and /delete of blogs

* ➕ Add body-parser dependency

* added landing login reg pages

* 💄 Add create view

* 🚧 Add create and landing view and backend code

* 💫 Add logo

* Merge rutudev

* 🎨 Structure blog routes

* 🚚 Restructure auth routes #4

* 🚚 Restructure auth routes #4

* 🚚 Restructure auth routes #4

* 👽 Add auth middleware for every blog crud operation #6

* 🗃️ Resolve deprecation warning

* ✅ correct auth middleware

* 💄 Change in Register and login page #5

* 🗃️ Generalize database name #10

* 🐛 Login bug resolve

* 💄 Add tui editor in create view #3

* 🔧 password validate

* 💩 Add script for create blog

* 🚧 validations

* ✨ Update create blog script

* 🚧 validations

* 🍻 Done validations #15 #12

* ✨ Render Blog on seperate route

* ✨ Implement back button #18

* 📱 Login view and validations

* 🔥 Remove a temporary file

* 🐛 Fix UI bugs #18 #21

* 🐛 Fix footer in log and reg #21

* commit

* 💄 Connect landing to auth pages

* 💄 Error message styling in auth pages #28

* ✨ Add partial views for blog cards #2

* 🐛 Fix route and changed file name #30

* ✨ Add explore page

* Changes Logout #32

* ⚡ redirects

* 💩 Connect user and blog

* Connect user and blog schemas

* Iss33 (#36)

* 📝 Add cover image and badges #33

* 📝 Add steps to run locally #33

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* ♻️ Remove typo

* 🐛 Fix login and redirect page bug

* ⚡ Secret in .env

* ♻️ Remove comments and extra code #37

* 🗃️ Add author field in blogSchema

* 💄 Add author name on card #42

* ♻️  Redirect to explore after login

* ✨ Explore page patch

* ✨ Add functionality to create button

* ✅ myblogs #45

* 🔨 removes myblog test #45

* ✨ Frontend my blogs #50

* 💄 update ui for frontend myblogs #50

* ✨ Add edit and delete functionality to blogs

* 👽 Integrate mailchimp

* ⚡ adds 404 page

* ✨ Add navbar dropdown and avatar #55

* ➕ Add migrate-mongo dependency

* 📝 Update documentation

* 🐛 Patch

* ♻️ Refactor API to get latest blogs first

* 🔒 Add DB_URI in env

* 💄 Add Date in Cards UI

* ✨ Fix footer in landing

* 💄 Render tags on explore and myblogs

* 💄 Add chips input in update and render blogs categorized by tags

* 💄 Fix UI bugs in update view

Co-authored-by: sahilambre <sahilws111@gmail.com>
Co-authored-by: Rutu <barve.rutu@gmail.com>
Co-authored-by: Rutu <62687761+rutu363@users.noreply.github.com>
Co-authored-by: Sahil Ambre <59484827+sahilambre@users.noreply.github.com>
tanmayc07 added a commit that referenced this issue Feb 9, 2021
* Test commit for sahildev

* test commit for rutudev

* Initial test commit for tanmaydev

* Test commit

* 💩 add authentication

* 🗃️ Add scripts for /create and /list of blogs

* 🗃️ Add scripts for /update and /delete of blogs

* ➕ Add body-parser dependency

* added landing login reg pages

* 💄 Add create view

* 🚧 Add create and landing view and backend code

* 💫 Add logo

* Merge rutudev

* 🎨 Structure blog routes

* 🚚 Restructure auth routes #4

* 🚚 Restructure auth routes #4

* 🚚 Restructure auth routes #4

* 👽 Add auth middleware for every blog crud operation #6

* 🗃️ Resolve deprecation warning

* ✅ correct auth middleware

* 💄 Change in Register and login page #5

* 🗃️ Generalize database name #10

* 🐛 Login bug resolve

* 💄 Add tui editor in create view #3

* 🔧 password validate

* 💩 Add script for create blog

* 🚧 validations

* ✨ Update create blog script

* 🚧 validations

* 🍻 Done validations #15 #12

* ✨ Render Blog on seperate route

* ✨ Implement back button #18

* 📱 Login view and validations

* 🔥 Remove a temporary file

* 🐛 Fix UI bugs #18 #21

* 🐛 Fix footer in log and reg #21

* commit

* 💄 Connect landing to auth pages

* 💄 Error message styling in auth pages #28

* ✨ Add partial views for blog cards #2

* 🐛 Fix route and changed file name #30

* ✨ Add explore page

* Changes Logout #32

* ⚡ redirects

* 💩 Connect user and blog

* Connect user and blog schemas

* Iss33 (#36)

* 📝 Add cover image and badges #33

* 📝 Add steps to run locally #33

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* ♻️ Remove typo

* 🐛 Fix login and redirect page bug

* ⚡ Secret in .env

* ♻️ Remove comments and extra code #37

* 🗃️ Add author field in blogSchema

* 💄 Add author name on card #42

* ♻️  Redirect to explore after login

* ✨ Explore page patch

* ✨ Add functionality to create button

* ✅ myblogs #45

* 🔨 removes myblog test #45

* ✨ Frontend my blogs #50

* 💄 update ui for frontend myblogs #50

* ✨ Add edit and delete functionality to blogs

* 👽 Integrate mailchimp

* ⚡ adds 404 page

* ✨ Add navbar dropdown and avatar #55

* ➕ Add migrate-mongo dependency

* 📝 Update documentation

* 🐛 Patch

* ♻️ Refactor API to get latest blogs first

* 🔒 Add DB_URI in env

* 💄 Add Date in Cards UI

* ✨ Fix footer in landing

* 💄 Render tags on explore and myblogs

* 💄 Add chips input in update and render blogs categorized by tags

* 💄 Fix UI bugs in update view

* Add files via upload

Add snapshots of application

* Add files via upload

Add svg snapshots file

* Update README.md

Add snapshots

* Update README.md

update readme with application snapshots

* Update README.md

Update readme with snapshots

Co-authored-by: Rutu <barve.rutu@gmail.com>
Co-authored-by: tanmayc07 <tanmayc32@gmail.com>
Co-authored-by: Tanmay Chaudhari <48885301+tanmayc07@users.noreply.github.com>
Co-authored-by: Rutu <62687761+rutu363@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants