-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from ablej-ssafy/feature/106-authentication
[#106]feat: 인증 검사 로직 추가 및 렌더링 최적화
- Loading branch information
Showing
21 changed files
with
264 additions
and
121 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use server'; | ||
|
||
import {cookies} from 'next/headers'; | ||
import {redirect} from 'next/navigation'; | ||
|
||
import {AUTH_REDIRECT_KEY} from '@/constants/cookie'; | ||
|
||
export async function redirectCookie(formData: FormData) { | ||
const redirectUrlRaw = formData.get('redirectUrl'); | ||
|
||
if (typeof redirectUrlRaw !== 'string') { | ||
console.error('잘못된 요청입니다.'); | ||
return; | ||
} | ||
|
||
const redirectUrl = redirectUrlRaw; | ||
|
||
cookies().set(AUTH_REDIRECT_KEY, redirectUrl, { | ||
maxAge: 60 * 5, | ||
}); | ||
redirect('/(.)signin'); | ||
} | ||
|
||
export default redirectCookie; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
font-size: 1.8rem; | ||
} | ||
|
||
& > a { | ||
& > button { | ||
display: block; | ||
height: 40px; | ||
padding: 0 20px; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import styles from './loading.module.scss'; | ||
|
||
interface LoadingProps { | ||
text: string; | ||
} | ||
|
||
const Loading = ({text}: LoadingProps) => { | ||
return ( | ||
<div className={styles['load-container']}> | ||
<div className={styles.loader}></div> | ||
<p>{text}</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Loading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@use '@/styles/mixin' as mixin; | ||
@use '@/styles/animations/loader' as animations; | ||
|
||
.load-container { | ||
flex-direction: column; | ||
gap: 24px; | ||
width: 100%; | ||
height: calc(100vh - 280px); | ||
font-size: 1.8rem; | ||
|
||
@media (width >= 1500px) { | ||
width: 1300px; | ||
margin: 0 auto 30px; | ||
} | ||
|
||
@media (width < 600px) { | ||
margin-top: 18px; | ||
} | ||
|
||
@include mixin.flex-default; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ | |
.submit-button { | ||
width: 100%; | ||
height: 100%; | ||
cursor: pointer; | ||
|
||
@include mixin.flex-default; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const AUTH_REDIRECT_KEY = 'auth_redirect_url'; |
Oops, something went wrong.