-
Notifications
You must be signed in to change notification settings - Fork 0
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
implemented auth [unfinished] #5
Conversation
…o figure out correct verfiy email link
src/components/Login.jsx
Outdated
import { logInWithEmailAndPassword, useNavigate } from '../utils/auth_utils'; | ||
// import { logInWithEmailAndPassword , signInWithGoogle, useNavigate } from '../utils/auth_utils'; | ||
|
||
const Login = ({ cookies }) => { |
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.
Fast refresh only works when a file only exports components. Move your component(s) to a separate file.
src/components/Login.jsx
Outdated
cookies: instanceOf(Cookies).isRequired, | ||
}; | ||
|
||
export default withCookies(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.
Fast refresh can't handle anonymous components. Add a name to your export.
src/components/Logout.jsx
Outdated
import { logout, useNavigate } from '../utils/auth_utils'; | ||
import { Cookies, withCookies } from '../utils/cookie_utils'; | ||
|
||
const Logout = ({ cookies }) => { |
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.
Fast refresh only works when a file only exports components. Move your component(s) to a separate file.
src/components/Logout.jsx
Outdated
cookies: instanceOf(Cookies).isRequired, | ||
}; | ||
|
||
export default withCookies(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.
Fast refresh can't handle anonymous components. Add a name to your export.
* @param {Cookies} cookies The user's current cookies | ||
* @returns The relevant path to redirect the user to depending on authentication state. | ||
*/ | ||
const ProtectedRoute = ({ Component, redirectPath, roles, cookies }) => { |
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.
Fast refresh only works when a file only exports components. Move your component(s) to a separate file.
cookies: instanceOf(Cookies).isRequired, | ||
}; | ||
|
||
export default withCookies(ProtectedRoute); |
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.
Fast refresh can't handle anonymous components. Add a name to your export.
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.
overall, everything functionally works! we just have a few minor comments below. and could you also move all the new components you made to a folder called Authentication
? after that you're good to merge :)
import { logInWithEmailAndPassword, useNavigate } from '../../utils/auth_utils'; | ||
// import { logInWithEmailAndPassword , signInWithGoogle, useNavigate } from '../utils/auth_utils'; | ||
|
||
const Login = ({ cookies }) => { |
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.
Fast refresh only works when a file only exports components. Move your component(s) to a separate file.
cookies: instanceOf(Cookies).isRequired, | ||
}; | ||
|
||
export default withCookies(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.
Fast refresh can't handle anonymous components. Add a name to your export.
import { logout, useNavigate } from '../../utils/auth_utils'; | ||
import { Cookies, withCookies } from '../../utils/cookie_utils'; | ||
|
||
const Logout = ({ cookies }) => { |
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.
Fast refresh only works when a file only exports components. Move your component(s) to a separate file.
cookies: instanceOf(Cookies).isRequired, | ||
}; | ||
|
||
export default withCookies(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.
Fast refresh can't handle anonymous components. Add a name to your export.
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.
lgtm :)
closes #3