feat(community): add privy-auth template#315
feat(community): add privy-auth template#315hetansh2220 wants to merge 4 commits intosolana-foundation:mainfrom
Conversation
| }, | ||
| embeddedWallets: { | ||
| solana: { | ||
| createOnLogin: "all-users", |
There was a problem hiding this comment.
Any reason for all-users and not users-without-wallets?
| @@ -0,0 +1,48 @@ | |||
| "use client"; | |||
There was a problem hiding this comment.
You should be using useWallets from the @privy-io/react-auth/solana as opposed to creating a separate hook for creating the wallet object from user.linkedWallets.
import {useWallets} from '@privy-io/react-auth/solana';
| "use client"; | ||
|
|
||
| import { usePrivy } from "@privy-io/react-auth"; | ||
| import { useSolanaWallet } from "@/hooks/use-solana-wallet"; |
There was a problem hiding this comment.
commented below but this should be using hooks from the Privy react auth library
There was a problem hiding this comment.
| "Hello from privy-auth! This is a demo message signed with your embedded Solana wallet.", | ||
| ); | ||
|
|
||
| const result = await signMessage({ |
There was a problem hiding this comment.
this should take in a wallet returned by useWallets hook from privy
| @@ -0,0 +1,39 @@ | |||
| import type { | |||
There was a problem hiding this comment.
this can probably go away once you use useWallets hook!
|
This pull request has been automatically marked as stale because it has not had any activity for 7 days. It will be closed in 7 days if no further activity occurs. If you believe this PR is still relevant, please add a comment or push new commits to keep it open. Thank you for your contributions! |
Overview
Adds
community/privy-auth— a Next.js Solana dApp starter with Privy authentication, embedded wallets, and social login support.Features
Tech Stack
Usage