refactor: social login buttons
This commit is contained in:
@@ -84,13 +84,18 @@ export default function LoginPage() {
|
||||
toast.error(error.data);
|
||||
break;
|
||||
case 401:
|
||||
toast.error("username or password incorrect");
|
||||
toast.error("Username or Password incorrect");
|
||||
break;
|
||||
case 404:
|
||||
toast.error("account not exsit");
|
||||
toast.error("Account not exist");
|
||||
break;
|
||||
case 410:
|
||||
toast.error(
|
||||
"No associated account found, please contact admin for an invitation link to join."
|
||||
);
|
||||
break;
|
||||
default:
|
||||
toast.error("something error");
|
||||
toast.error("Something Error");
|
||||
break;
|
||||
}
|
||||
return;
|
||||
@@ -173,7 +178,7 @@ export default function LoginPage() {
|
||||
{hasDivider && <hr className="or" />}
|
||||
{enableMagicLink && <MagicLinkLogin />}
|
||||
{googleLogin && <GoogleLoginButton clientId={clientId} />}
|
||||
{enableGithubLogin && <GithubLoginButton config={githubAuthConfig} />}
|
||||
{enableGithubLogin && <GithubLoginButton client_id={githubAuthConfig?.client_id} />}
|
||||
{enableMetamaskLogin && <MetamaskLoginButton login={login} />}
|
||||
{oidc.length > 0 && <OidcLoginButton issuers={oidc} />}
|
||||
{whoCanSignUp === "EveryOne" && <SignUpLink />}
|
||||
|
||||
@@ -139,8 +139,10 @@ export default function Reg() {
|
||||
</Button>
|
||||
</form>
|
||||
<hr className="or" />
|
||||
{googleLogin && <GoogleLoginButton clientId={clientId} />}
|
||||
{enableGithubLogin && <GithubLoginButton config={githubAuthConfig} />}
|
||||
{googleLogin && <GoogleLoginButton type="register" clientId={clientId} />}
|
||||
{enableGithubLogin && (
|
||||
<GithubLoginButton type="register" client_id={githubAuthConfig?.client_id} />
|
||||
)}
|
||||
<SignInLink />
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { Outlet } from "react-router-dom";
|
||||
// import { useMatch } from "react-router-dom";
|
||||
|
||||
import StyledWrapper from "./styled";
|
||||
|
||||
export default function RegContainer() {
|
||||
|
||||
Reference in New Issue
Block a user