appId.You must have a valid appId for social login to work.
import { PhantomProvider } from "@phantom/react-sdk";
function App() {
return (
<PhantomProvider
config={{
appId: "your-app-id-from-phantom-portal",
providers: ["google", "apple"],
addressTypes: ["solana"],
authOptions: {
redirectUrl: "https://your-app.com/auth/callback",
},
}}
>
<YourApp />
</PhantomProvider>
);
}
import { BrowserSDK, AddressType } from "@phantom/browser-sdk";
const sdk = new BrowserSDK({
appId: "your-app-id-from-phantom-portal",
providers: ["google", "apple"],
addressTypes: [AddressType.Solana],
authOptions: {
redirectUrl: "https://your-app.com/auth/callback",
},
});
import "react-native-get-random-values";
import { PhantomProvider } from "@phantom/react-native-sdk";
export default function App() {
return (
<PhantomProvider
config={{
appId: "your-app-id-from-phantom-portal",
providers: ["google", "apple"],
addressTypes: ["solana"],
scheme: "your-app-scheme",
redirectUrl: "your-app-scheme://auth/callback",
}}
>
<YourApp />
</PhantomProvider>
);
}
The ConnectButton component automatically presents social login options when providers are configured:
import { ConnectButton } from "@phantom/react-sdk";
function LoginPage() {
return (
<div>
<h1>Welcome</h1>
<p>Sign in with your Google or Apple account to get started.</p>
<ConnectButton />
</div>
);
}
Social login sessions persist for 7 days from the last authentication. Handle re-authentication gracefully:
import { useConnect } from "@phantom/react-sdk";
function SessionGuard({ children }: { children: React.ReactNode }) {
const { isConnected, connect } = useConnect();
if (!isConnected) {
return (
<div>
<p>Your session has expired. Please sign in again.</p>
<button onClick={() => connect()}>Reconnect</button>
</div>
);
}
return <>{children}</>;
}
appId is required — social login will not work without a valid app ID from Phantom Portal.providers accepts "google" and "apple" — these are the supported social login methods.redirectUrl in authOptions must be whitelisted in your Phantom Portal app settings.Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).