Refactor auth methods, remove i18n, and update UI
This commit covers a variety of actions that includes the refactoring of the authentication components to accept paths and invite tokens as props instead of a singular callback prop, thereby improving the component's flexibility. This refactor process removes 'withI18n' calls as i18n functionalities are no longer used. The commit also contains several adjustments to the UI components, including the authorization layout, pricing table, and sign-up page. It also includes minor changes to error messages, specifically those related to password resetting. Lastly, several peer dependencies are removed in the 'package.json' files and changes made to the 'browser.client.ts' file providing a significant code cleanup.
This commit is contained in:
@@ -18,6 +18,8 @@ export const generateMetadata = async () => {
|
||||
};
|
||||
|
||||
function PasswordResetPage() {
|
||||
const redirectPath = `${pathsConfig.auth.callback}?next=${pathsConfig.auth.passwordUpdate}`;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Heading level={5}>
|
||||
@@ -25,9 +27,7 @@ function PasswordResetPage() {
|
||||
</Heading>
|
||||
|
||||
<div className={'flex flex-col space-y-4'}>
|
||||
<PasswordResetRequestContainer
|
||||
redirectTo={pathsConfig.auth.passwordUpdate}
|
||||
/>
|
||||
<PasswordResetRequestContainer redirectPath={redirectPath} />
|
||||
|
||||
<div className={'flex justify-center text-xs'}>
|
||||
<Link href={pathsConfig.auth.signIn}>
|
||||
|
||||
@@ -18,7 +18,15 @@ export const generateMetadata = async () => {
|
||||
};
|
||||
};
|
||||
|
||||
function SignUpPage() {
|
||||
interface Props {
|
||||
searchParams: {
|
||||
invite_token?: string;
|
||||
};
|
||||
}
|
||||
|
||||
function SignUpPage({ searchParams }: Props) {
|
||||
const inviteToken = searchParams.invite_token;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Heading level={5}>
|
||||
@@ -27,7 +35,10 @@ function SignUpPage() {
|
||||
|
||||
<SignUpMethodsContainer
|
||||
providers={authConfig.providers}
|
||||
callbackPath={pathsConfig.auth.callback}
|
||||
paths={{
|
||||
callback: pathsConfig.auth.callback,
|
||||
}}
|
||||
inviteToken={inviteToken}
|
||||
/>
|
||||
|
||||
<div className={'justify-centers flex'}>
|
||||
|
||||
Reference in New Issue
Block a user