-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable passing down chain and api key from provider
- Loading branch information
1 parent
642915a
commit 16efa40
Showing
2 changed files
with
15 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@everipedia/iq-login": major | ||
--- | ||
|
||
Enable passing down chain and api key from provider. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,17 +14,7 @@ pnpm install @everipedia/iq-login [email protected] [email protected] @rainbow-me/rainbowkit@2 | |
|
||
## 🛠️ Setup | ||
|
||
1. Setup Environment Variables | ||
|
||
```bash | ||
# .env | ||
|
||
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=YOUR_PROJECT_ID | ||
NEXT_PUBLIC_IS_PRODUCTION=true/false | ||
NEXT_PUBLIC_WEB3_AUTH_CLIENT_ID=YOUR_CLIENT_ID | ||
``` | ||
|
||
2. Add the package to your Tailwind CSS configuration: | ||
1. Add the package to your Tailwind CSS configuration: | ||
```tsx | ||
// tailwind.config.ts | ||
|
||
|
@@ -41,12 +31,13 @@ const config: Config = { | |
export default config; | ||
|
||
|
||
3. Wrap your application with the RainbowKitClientProvider in your layout file: | ||
2. Wrap your application with the RainbowKitClientProvider in your layout file: | ||
|
||
```tsx | ||
// app/layout.tsx | ||
import { RainbowKitClientProvider } from "@everipedia/iq-login"; | ||
import { polygon } from 'wagmi/chains'; | ||
export default function RootLayout({ | ||
children, | ||
|
@@ -56,14 +47,19 @@ export default function RootLayout({ | |
return ( | ||
<html lang="en"> | ||
<body> | ||
<RainbowKitClientProvider>{children}</RainbowKitClientProvider> | ||
<IqLoginProvider | ||
chain={polygon} // Required: Specify the chain to use | ||
web3AuthProjectId="YOUR_PROJECT_ID" // Required: Web3Auth Project ID | ||
> | ||
{children} | ||
</IqLoginProvider> | ||
</body> | ||
</html> | ||
); | ||
} | ||
``` | ||
|
||
4. Add login page to your application. Note: You need to import rainbowkit styles in your application. | ||
3. Add login page to your application. Note: You need to import rainbowkit styles in your application. | ||
```tsx | ||
// app/login/page.tsx | ||
|