Requirements

Currently, “Log in with Station” is not compatible with wallet modal packages (eg. ConnectKit, Privy) and is best fit for teams that implement their own connection experience.

  1. Create an API key on the GroupOS app
  2. Use wagmi ^1.0.0 and viem ^1.0.0 in your dApp

Integration

Install the GroupOS SSO package:

npm install @station/sso

Import the wallet connector and add it to your wagmi config:

import { WagmiConfig, createConfig, configureChains, mainnet } from 'wagmi'
import { publicProvider } from 'wagmi/providers/public'
import { InjectedConnector } from 'wagmi/connectors/injected'
import { GroupOsConnector } from '@groupos/sso'
 
const { chains, publicClient } = configureChains([mainnet], [publicProvider()])
 
const config = createConfig({
  publicClient,
  connectors: [
    new InjectedConnector({ chains }),
    new GroupOsConnector({
      chains,
      options: {
        apiKey: 'GROUPOS_API_KEY'
      },
    }),
  ],
})

function App() {
  return (
    <WagmiConfig config={config}>
      <YourRoutes />
    </WagmiConfig>
  )
}

Add the GroupOS option in your supported wallet list

import { GroupOsIcon } from '@groupos/sso'

function YourOnboardingPage() {
	return (
		<YourModal>
			{* ...options *}
     <YourWalletOption>
	     <GroupOsIcon>
			 <p>GroupOS</p>
     </YourWalletOption>
		</YourModal>
	)
}

Run your test