Login, logout and middleware updates
This commit is contained in:
parent
f552f8024f
commit
9fb3665ced
18 changed files with 96 additions and 50 deletions
|
|
@ -29,6 +29,7 @@ export const Login: FC<LoginProps> = ({ session }) => {
|
|||
typeof window !== "undefined" && window.location.origin
|
||||
? window.location.origin
|
||||
: "";
|
||||
const callbackUrl = `${origin}/setup`;
|
||||
const [provider, setProvider] = useState(undefined);
|
||||
const [email, setEmail] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
|
|
@ -157,7 +158,7 @@ export const Login: FC<LoginProps> = ({ session }) => {
|
|||
sx={buttonStyles}
|
||||
onClick={() =>
|
||||
signIn("google", {
|
||||
callbackUrl: `${origin}`,
|
||||
callbackUrl,
|
||||
})
|
||||
}
|
||||
>
|
||||
|
|
@ -173,7 +174,7 @@ export const Login: FC<LoginProps> = ({ session }) => {
|
|||
sx={buttonStyles}
|
||||
onClick={() =>
|
||||
signIn("apple", {
|
||||
callbackUrl: `${window.location.origin}`,
|
||||
callbackUrl,
|
||||
})
|
||||
}
|
||||
>
|
||||
|
|
@ -214,7 +215,7 @@ export const Login: FC<LoginProps> = ({ session }) => {
|
|||
signIn("credentials", {
|
||||
email,
|
||||
password,
|
||||
callbackUrl: `${origin}/setup`,
|
||||
callbackUrl,
|
||||
})
|
||||
}
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue