-
Notifications
You must be signed in to change notification settings - Fork 1
chore(client): remove Firebase and JWT authentication #6
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
Changes from all commits
d8d07b5
f5df752
e18041b
ac6e402
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 |
|---|---|---|
|
|
@@ -2,3 +2,5 @@ node_modules | |
| .DS_Store | ||
| .DS_Store | ||
| .DS_Store | ||
| .env | ||
| .env.local | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| NEXT_PUBLIC_DEV_MODE=dev | ||
| NEXT_PUBLIC_BUILD_MODE=production | ||
| NEXT_PUBLIC_APP_VERSION=$npm_package_version | ||
| NEXT_PUBLIC_API_URL= | ||
|
|
||
| NEXT_PUBLIC_ASSET_BASE_URL=https://prium.github.io/aurora | ||
|
|
||
| NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN= | ||
|
|
||
| NEXTAUTH_URL=http://localhost:3001 | ||
| NEXTAUTH_SECRET=secret | ||
|
|
||
| BASEPATH='' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,5 +36,7 @@ yarn-error.log* | |
| # typescript | ||
| *.tsbuildinfo | ||
| next-env.d.ts | ||
| .env | ||
| .env.local | ||
|
|
||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| 'use client'; | ||
|
|
||
| import ForgotPasswordForm from 'components/sections/authentications/common/ForgotPasswordForm'; | ||
| import axiosInstance from 'services/axios/axiosInstance'; | ||
| import { apiEndpoints } from 'routes/paths'; | ||
|
|
||
| const Page = () => { | ||
| const handleSendResetLink = async ({ email }: { email: string }) => { | ||
| try { | ||
| const res = await axiosInstance.post(apiEndpoints.forgotPassword, { email }); | ||
sshahriazz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| return res.data; | ||
| } catch (error: any) { | ||
| throw new Error(error.response?.data?.message || 'Failed to send reset link'); | ||
| } | ||
| }; | ||
|
|
||
| return <ForgotPasswordForm handleSendResetLink={handleSendResetLink} />; | ||
| }; | ||
|
|
||
| export default Page; | ||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| 'use client'; | ||
|
|
||
| import { signIn } from 'next-auth/react'; | ||
| import LoginForm from 'components/sections/authentications/default/LoginForm'; | ||
| import paths from 'routes/paths'; | ||
| import { defaultJwtAuthCredentials } from 'config'; | ||
|
|
||
| const Page = () => { | ||
| const handleLogin = async (data: { email: string; password: string }) => { | ||
| return await signIn('credentials', { | ||
| email: data.email, | ||
| password: data.password, | ||
| redirect: false, | ||
| }); | ||
| }; | ||
|
|
||
| return ( | ||
| <LoginForm | ||
| handleLogin={handleLogin} | ||
| signUpLink={paths.signup} | ||
| forgotPasswordLink={paths.forgotPassword} | ||
| socialAuth={false} | ||
| rememberDevice={true} | ||
| defaultCredential={defaultJwtAuthCredentials} | ||
| /> | ||
| ); | ||
| }; | ||
|
|
||
| export default Page; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| 'use client'; | ||
|
|
||
| import { signIn } from 'next-auth/react'; | ||
| import SignupForm from 'components/sections/authentications/default/SignupForm'; | ||
|
|
||
| const Page = () => { | ||
| const handleSignup = async (data: { name: string; email: string; password: string }) => { | ||
| return await signIn('signup', { | ||
| name: data.name, | ||
| email: data.email, | ||
| password: data.password, | ||
| redirect: false, | ||
| }); | ||
| }; | ||
|
|
||
| return <SignupForm handleSignup={handleSignup} socialAuth={false} />; | ||
| }; | ||
|
|
||
| export default Page; |
This file was deleted.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.