[SOLVED] How to connect Solflare and Sollet wallet using moralis authentication provider?

I am creating a new dapp but I can’t figure out how I can connect Solflare and Sollet wallet of Solana blockchain. Here is my code below.

import './App.css';
import { useMoralis } from "react-moralis";

function App() {

  const { authenticate, isAuthenticated, user, logout } = useMoralis();

  console.log("isAuthenticated: ", isAuthenticated);
  if (!isAuthenticated) {
    return (
      <div>
        <button onClick={() => authenticate({
          type: "sol",
          signingMessage: "Samrat Authentication",
        })}>Authenticate</button>
      </div>
    );
  }

  return (
    <div>
      <h1>Welcome {user.get("username")}</h1>
      <button onClick={logout}>Log Out</button>
    </div>
  );
}

export default App;

kindly help me it’s urgent.

Only Phantom wallet is supported with v1 sdk, to connect to the other wallets you need to use methods as shown in their respective docs. and also the session wont be created in moralis database.