/auth
Search
K
Comment on page

openSignIn

This function opens the sign-in modal.

Usage

import React from "react";
import { useSlashAuth } from "@slashauth/slashauth-react";
export const LoginButton = () => {
const { openSignIn } = useSlashAuth();
return (
<button onClick={() => openSignIn()}>Login</button>
);
}

Return Value

void

Configuration

walletConnectOnly (optional)

Set to true to only connect the wallet and not initiate the signin flow.
import React from 'react';
import { useSlashAuth } from '@slashauth/slashauth-react';
export const LoginButton = () => {
const { openSignIn } = useSlashAuth();
return (
<button onClick={() => openSignIn({ walletConnectOnly: true })}>
Login
</button>
);
};