-
Notifications
You must be signed in to change notification settings - Fork 4
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 preventAuth parameter #40
Conversation
index.js
Outdated
@@ -39,6 +39,9 @@ function isProtectedRoute(req) { | |||
*/ | |||
function isAuthenticated(site) { | |||
return function (req, res, next) { | |||
// eslint-disable-next-line no-constant-condition | |||
if (process.env.PREVENT_AUTH || true) return res.redirect(`${getAuthUrl(site)}/login`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add this here?
Line 4 in fe2025c
module.exports.AUTH_LEVELS = { |
@@ -102,12 +102,6 @@ workflows: | |||
version: 2 | |||
test: | |||
jobs: | |||
- test_node10: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the circleci files so it doesn't fail and notify everyone who's listening lol
I'll add an issue to redo this with github actions.
@@ -4,6 +4,15 @@ | |||
<meta charset="utf-8"> | |||
<title>Log In - Clay</title> | |||
<style> | |||
@keyframes fadeIn { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a small animation to the maintenance message just because.
localAuthPath: `${authUrl}/local`, | ||
useLocalAuth: providers.includes('local') | ||
logoutLink: `${authUrl}/logout`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-ordered alphabetically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
COOL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
This PR introduces a flag that, when true, will prevent users from either going into edit mode or making any edits to a page they had already opened in edit mode in their browsers. This environment variable is optional and you can set it up from your Clay instance and it'll be picked up here since it'll share the same env file!