feat(dashboard-v2): show instance, offer SSO when advertised
This commit is contained in:
4 files changed
+37
-10
No files matched your search
@@ -25,7 +25,7 @@ const contentStyle: CSSProperties = {
|
||||
};
|
||||
|
||||
export default function LoginPage() {
|
||||
const { signIn } = useSession();
|
||||
const { signIn, instance, oidc } = useSession();
|
||||
const [email, setEmail] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
@@ -98,6 +98,21 @@ export default function LoginPage() {
|
||||
isLoading={isLoading}
|
||||
onClick={() => void handleSignIn()}
|
||||
/>
|
||||
{oidc && (
|
||||
<Button
|
||||
label="Continue with SSO"
|
||||
variant="secondary"
|
||||
size="lg"
|
||||
onClick={() => {
|
||||
window.location.href = "/oauth2/login";
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{instance && (
|
||||
<Text type="supporting" color="secondary" justify="center">
|
||||
{instance}
|
||||
</Text>
|
||||
)}
|
||||
</VStack>
|
||||
</Card>
|
||||
</VStack>
|
||||
|
||||
Reference in new issue
Block a user