-
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
Remove stale cookies from login page #78
base: main
Are you sure you want to change the base?
Changes from all commits
e3eb0c5
0ad7887
c628b73
1e5d5ad
d508fda
f9c843a
f3809f3
4e744cc
503802c
a5d2e42
9a3efaf
6fe1a74
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { deleteUserCookies } from '@/lib/services/CookieService'; | ||
import { redirect } from 'next/navigation'; | ||
|
||
export async function GET(request: Request) { | ||
await deleteUserCookies(); | ||
redirect('/login'); | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can delete this, we switched to using a route handler instead |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { useEffect } from 'react'; | ||
import { deleteUserCookies } from '@/lib/services/CookieService'; | ||
|
||
const Logout = () => { | ||
// useEffect for server actions | ||
useEffect(() => { | ||
deleteUserCookies(); | ||
}); | ||
return <></>; | ||
}; | ||
|
||
export default Logout; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ import { getErrorMessage } from '../utils'; | |
|
||
export const login = async (email: string, password: string): Promise<LoginResponse> => { | ||
const requestUrl = `${config.api.baseUrl}${config.api.endpoints.auth.login}`; | ||
console.log('requestUrl', requestUrl); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove 🙏 |
||
const requestBody: LoginRequest = { email, password }; | ||
const response = await axios.post<LoginResponse>(requestUrl, requestBody); | ||
return response.data; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
## Setup | ||
|
||
1. Copy `.env.example` to `.env` and fill in the values | ||
1. If you are on ACM @ UCSD Dev Team, fields are available in our google drive for step 1 and 2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you undo this change (so there are no changes to the server/ folder), otherwise I think merging your PR might take down both portals while the backend action runs |
||
2. Add Firebase Admin credentials to a file named `firebaseServiceAccountKey.json`, at the same level as the `.env` file. | ||
3. Start up Docker Desktop | ||
4. Spin up Postgres: | ||
|
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.
you might also need to update the application and profile edit pages