-
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.
Merge pull request #75 from EveripediaNetwork/custom-chain-input
- Loading branch information
Showing
4 changed files
with
66 additions
and
80 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, wallet connect and web3auth ids from provider. Now IQ Login won't recognize the envs set and these must be passed down as props. |
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 | ||
|
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
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